mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-02 21:12:02 +08:00
35 lines
602 B
PHP
35 lines
602 B
PHP
<?php
|
|
|
|
class ContactsSuggestionsExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
|
{
|
|
const
|
|
NAME = '',
|
|
CATEGORY = 'General',
|
|
DESCRIPTION = '';
|
|
|
|
public function Init() : void
|
|
{
|
|
$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;
|
|
}
|
|
}
|
|
}
|