forked from kanboard/plugin-broadcast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlugin.php
51 lines (41 loc) · 1.34 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
<?php
namespace Kanboard\Plugin\Broadcast;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Security\Role;
use Kanboard\Core\Translator;
use Kanboard\Plugin\Broadcast\Helper\BroadcastHelper;
class Plugin extends Base
{
public function initialize()
{
$this->template->hook->attach('template:layout:top', 'Broadcast:message');
$this->template->hook->attach('template:config:sidebar', 'Broadcast:admin/sidebar');
$this->hook->on('template:layout:css', array('template' => 'plugins/Broadcast/styles.css'));
$this->helper->register('broadcast', new BroadcastHelper($this->container));
$this->applicationAccessMap->add('BroadcastController', array('show', 'save', 'clear'), Role::APP_ADMIN);
}
public function onStartup()
{
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
}
public function getPluginName()
{
return 'Broadcast';
}
public function getPluginAuthor()
{
return 'Frédéric Guillot';
}
public function getPluginVersion()
{
return '1.1.1';
}
public function getPluginDescription()
{
return 'Broadcast messages to users via the application or by email.';
}
public function getPluginHomepage()
{
return 'https://github.com/kanboard/plugin-broadcast';
}
}