mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-06 14:58:19 +08:00
30 lines
No EOL
525 B
PHP
30 lines
No EOL
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;
|
|
}
|
|
}
|
|
} |