mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Added example plugin how to use Kolab for contact suggestions
This commit is contained in:
parent
f7ba43437e
commit
5c9b7d7000
4 changed files with 141 additions and 6 deletions
39
plugins/kolab/index.php
Normal file
39
plugins/kolab/index.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
class KolabPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||
{
|
||||
const
|
||||
NAME = 'Kolab',
|
||||
VERSION = '0.1',
|
||||
RELEASE = '2022-05-13',
|
||||
CATEGORY = 'Security',
|
||||
DESCRIPTION = 'Get contacts suggestions from Kolab.',
|
||||
REQUIRED = '2.15.2';
|
||||
|
||||
public function Init() : void
|
||||
{
|
||||
$this->addHook('main.fabrica', 'MainFabrica');
|
||||
}
|
||||
|
||||
public function Supported() : string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $mResult
|
||||
*/
|
||||
public function MainFabrica(string $sName, &$mResult)
|
||||
{
|
||||
if ('suggestions' === $sName) {
|
||||
if (!\is_array($mResult)) {
|
||||
$mResult = array();
|
||||
}
|
||||
// $sFolder = \trim($this->Config()->Get('plugin', 'mailbox', ''));
|
||||
// if ($sFolder) {
|
||||
include_once __DIR__ . '/KolabContactsSuggestions.php';
|
||||
$mResult[] = new KolabContactsSuggestions();
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue