forked from rainlab/notify-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlugin.php
61 lines (56 loc) · 1.91 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
58
59
60
61
<?php namespace RainLab\Notify;
use Backend;
use System\Classes\PluginBase;
use System\Classes\SettingsManager;
/**
* The plugin.php file (called the plugin initialization script) defines the plugin information class.
*/
class Plugin extends PluginBase
{
public function pluginDetails()
{
return [
'name' => 'rainlab.notify::lang.plugin.name',
'description' => 'rainlab.notify::lang.plugin.description',
'author' => 'Alexey Bobkov, Samuel Georges',
'icon' => 'icon-bullhorn'
];
}
public function registerSettings()
{
return [
'notifications' => [
'label' => 'rainlab.notify::lang.notifications.menu_label',
'description' => 'rainlab.notify::lang.notifications.menu_description',
'category' => SettingsManager::CATEGORY_NOTIFICATIONS,
'icon' => 'icon-bullhorn',
'url' => Backend::url('rainlab/notify/notifications'),
'permissions' => ['rainlab.notify.manage_notifications'],
'order' => 600
],
];
}
public function registerNotificationRules()
{
return [
'groups' => [],
'events' => [],
'actions' => [
\RainLab\Notify\NotifyRules\SaveDatabaseAction::class,
\RainLab\Notify\NotifyRules\SendMailTemplateAction::class,
],
'conditions' => [
\RainLab\Notify\NotifyRules\ExecutionContextCondition::class,
],
];
}
public function registerPermissions()
{
return [
'rainlab.notify.manage_notifications' => [
'tab' => SettingsManager::CATEGORY_NOTIFICATIONS,
'label' => 'rainlab.notify::lang.permissions.manage_notifications'
],
];
}
}