mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Contacts suggestions example plugin
This commit is contained in:
parent
86d763420d
commit
436e54891e
9 changed files with 106 additions and 16 deletions
30
plugins/contacts-suggestions-example/index.php
Normal file
30
plugins/contacts-suggestions-example/index.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
class ContactsSuggestionsExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||
{
|
||||
public function Init()
|
||||
{
|
||||
$this->addHook('main.fabrica', 'MainFabrica');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
* @param mixed $mResult
|
||||
*/
|
||||
public function MainFabrica($sName, &$mResult)
|
||||
{
|
||||
switch ($sName)
|
||||
{
|
||||
case 'suggestions':
|
||||
|
||||
if (!\is_array($mResult))
|
||||
{
|
||||
$mResult = array();
|
||||
}
|
||||
|
||||
include_once __DIR__.'/ContactsExampleSuggestions.php';
|
||||
$mResult[] = new ContactsExampleSuggestions();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue