-
Notifications
You must be signed in to change notification settings - Fork 4
/
Plugin.php
executable file
·108 lines (100 loc) · 4.37 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php namespace Mavitm\Estate;
use Backend;
use System\Classes\PluginBase;
class Plugin extends PluginBase
{
public $require = ['RainLab.Translate', 'GinoPane.AwesomeIconsList'];
public function pluginDetails()
{
return [
'name' => 'mavitm.estate::lang.plugin.name',
'description' => 'mavitm.estate::lang.plugin.description',
'author' => 'Mavitm',
'icon' => 'icon-building',
'homepage' => ''
];
}
public function registerComponents()
{
return [
'Mavitm\Estate\Components\SearchForm' => 'search_form',
'Mavitm\Estate\Components\Realtylist' => 'realty_list',
'Mavitm\Estate\Components\Realtydetail' => 'realty_detail',
'Mavitm\Estate\Components\Category' => 'realty_category',
'Mavitm\Estate\Components\ContactForm' => 'contact_form',
'Mavitm\Estate\Components\PopularList' => 'popular_list',
'Mavitm\Estate\Components\NewestList' => 'newest_list'
];
}
public function registerPermissions()
{
return [
'mavitm.estate.access.realty' => [
'tab' => 'mavitm.estate::lang.plugin.name',
'label' => 'mavitm.estate::lang.plugin.name'
]
];
}
public function registerNavigation()
{
return [
'estate' => [
'label' => 'mavitm.estate::lang.plugin.name',
'url' => Backend::url('mavitm/estate/realties'),
'icon' => 'icon-building',
'permissions' => ['mavitm.estate.access.realty'],
'sideMenu' => [
'realty' => [
'label' => 'mavitm.estate::lang.plugin.name',
'url' => Backend::url('mavitm/estate/realties'),
'icon' => 'icon-building-o',
'permissions' => ['mavitm.estate.access.realty']
],
'category' => [
'label' => 'mavitm.estate::lang.plugin.category',
'url' => Backend::url('mavitm/estate/categories'),
'icon' => 'icon-folder',
'permissions' =>['mavitm.estate.access.realty']
],
'feature' => [
'label' => 'mavitm.estate::lang.plugin.features',
'url' => Backend::url('mavitm/estate/features'),
'icon' => 'icon-check-square-o',
'permissions' =>['mavitm.estate.access.realty']
],
'tags' => [
'label' => 'mavitm.estate::lang.tags.title',
'url' => Backend::url('mavitm/estate/tags'),
'icon' => 'icon-tags',
'permissions' => ['mavitm.estate.access.realty']
],
'setting' => [
'label' => 'mavitm.estate::lang.settings.menuLabel',
'url' => Backend::url('system/settings/update/mavitm/estate/settings'),
'icon' => 'icon-cog',
'permissions' => ['mavitm.estate.access.realty']
],
'messages' => [
'label' => 'mavitm.estate::lang.plugin.messages',
'url' => Backend::url('mavitm/estate/messages'),
'icon' => 'icon-envelope',
'permissions' => ['mavitm.estate.access.realty']
]
]
]
];
}
public function registerSettings()
{
return [
'settings' => [
'label' => 'mavitm.estate::lang.settings.menuLabel',
'description' => 'mavitm.estate::lang.settings.menuDescription',
'category' => 'mavitm.estate::lang.plugin.name',
'icon' => 'icon-cog',
'class' => 'Mavitm\Estate\Models\Settings',
'order' => 100
],
];
}
}