forked from jawainc/simplecontact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlugin.php
81 lines (72 loc) · 2.66 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php namespace Zainab\SimpleContact;
use System\Classes\PluginBase;
use Backend;
use Zainab\SimpleContact\Controllers\SimpleContact;
class Plugin extends PluginBase
{
public function pluginDetails()
{
return [
'name' => 'zainab.simplecontact::lang.plugin.name',
'description' => 'zainab.simplecontact::lang.plugin.description',
'author' => 'Jawad',
'icon' => 'icon-envelope'
];
}
public function registerComponents()
{
return [
'Zainab\SimpleContact\Components\SimpleContact' => 'simpleContact'
];
}
public function registerSettings()
{
return [
'config' => [
'label' => 'Simple Contact',
'icon' => 'icon-envelope',
'description' => 'Manage Settings.',
'class' => 'Zainab\SimpleContact\Models\Settings',
'permissions' => ['zainab.simplecontact.manage_settings'],
'order' => 60
]
];
}
public function registerNavigation(){
return [
'main-menu-item' => [
'label' => 'zainab.simplecontact::lang.simplecontact.mainmenu',
'url' => Backend::url('zainab/simplecontact/simplecontact'),
'icon' => 'icon-envelope',
'permissions' => ['zainab.simplecontact.inbox'],
'sideMenu' => [
'side-menu-item' => [
'label' => 'zainab.simplecontact::lang.simplecontact.submenu',
'icon' => 'icon-inbox',
'url' => Backend::url('zainab/simplecontact/simplecontact'),
'permissions' => ['zainab.simplecontact.inbox'],
'counter' => SimpleContact::countUnreadMessages(),
'counterLabel' => 'Un-Read Messages'
]
]
]
];
}
public function registerMailTemplates()
{
return [
'zainab.simplecontact::mail.reply' => 'Simple Contact -- reply message',
'zainab.simplecontact::mail.auto-response' => 'Simple Contact -- auto response message',
'zainab.simplecontact::mail.notification' => 'Simple Contact -- notification mail',
];
}
public function registerReportWidgets()
{
return [
'Zainab\SimpleContact\ReportWidgets\MessageReport' => [
'label' => 'zainab.simplecontact::lang.widget.label',
'context' => 'dashboard'
],
];
}
}