mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-07 07:18:39 +08:00
30 lines
525 B
PHP
30 lines
525 B
PHP
|
<?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;
|
||
|
}
|
||
|
}
|
||
|
}
|