forked from kanboard/plugin-jabber
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Plugin.php
57 lines (46 loc) · 1.57 KB
/
Plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
namespace Kanboard\Plugin\Telegram;
require_once __DIR__.'/vendor/autoload.php';
use Kanboard\Core\Translator;
use Kanboard\Core\Plugin\Base;
/**
* Telegram Plugin
*
* @package telegram
* @author Manu Varkey
*/
class Plugin extends Base
{
public function initialize()
{
$this->template->hook->attach('template:config:integrations', 'telegram:config/integration');
$this->template->hook->attach('template:project:integrations', 'telegram:project/integration',array('bot_name' => $this->configModel->get('telegram_username')) );
$this->template->hook->attach('template:user:integrations', 'telegram:user/integration',array('bot_name'=> $this->configModel->get('telegram_username')) );
$this->userNotificationTypeModel->setType('telegram', t('Telegram'), '\Kanboard\Plugin\Telegram\Notification\Telegram');
$this->projectNotificationTypeModel->setType('telegram', t('Telegram'), '\Kanboard\Plugin\Telegram\Notification\Telegram');
}
public function onStartup()
{
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
}
public function getPluginDescription()
{
return 'Receive notifications on Telegram';
}
public function getPluginAuthor()
{
return 'Manu Varkey';
}
public function getPluginVersion()
{
return '1.6.0';
}
public function getPluginHomepage()
{
return 'https://github.com/manuvarkey/plugin-telegram';
}
public function getCompatibleVersion()
{
return '>=1.2.22';
}
}