2015-08-20 02:58:34 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class ContactsSuggestionsExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
|
|
|
{
|
2021-02-10 16:50:20 +08:00
|
|
|
const
|
|
|
|
NAME = '',
|
|
|
|
CATEGORY = 'General',
|
|
|
|
DESCRIPTION = '';
|
|
|
|
|
2020-08-31 00:04:54 +08:00
|
|
|
public function Init() : void
|
2015-08-20 02:58:34 +08:00
|
|
|
{
|
|
|
|
$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;
|
|
|
|
}
|
|
|
|
}
|
2020-08-31 00:04:54 +08:00
|
|
|
}
|