snappymail/plugins/contacts-suggestions-example/index.php

36 lines
602 B
PHP
Raw Normal View History

2015-08-20 02:58:34 +08:00
<?php
class ContactsSuggestionsExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
{
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
}