-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPlugin.php
More file actions
64 lines (54 loc) · 1.35 KB
/
Plugin.php
File metadata and controls
64 lines (54 loc) · 1.35 KB
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
<?php namespace RtlWeb\Rtler;
use Backend;
use System\Classes\CombineAssets;
use System\Classes\PluginBase;
use October\Rain\Router\Helper as RouterHelper;
use System\Classes\SettingsManager;
use RtlWeb\Rtler\Classes\Rtler;
/**
* Rtler Plugin Information File
*/
class Plugin extends PluginBase
{
public $elevated = true;
/**
* Returns information about this plugin.
*
* @return array
*/
public function pluginDetails()
{
return [
'name' => 'rtlweb.rtler::lang.plugin.name',
'description' => 'rtlweb.rtler::lang.plugin.description',
'author' => 'Sajjad Servatjoo & Saman Sorushniya',
'icon' => 'icon-leaf'
];
}
public function boot()
{
}
public function register()
{
$this->registerAssetBundles();
Rtler::instance()->register();
}
/**
* Register asset bundles
*/
protected function registerAssetBundles()
{
CombineAssets::registerCallback(function ($combiner) {
$combiner->registerBundle( '$/rtlweb/rtler/assets/js/rtler.js');
});
}
public function registerPermissions()
{
return [
'rtlweb.rtler.manage' => [
'tab' => 'system::lang.permissions.name',
'label' => 'Manage Rtler'
]
];
}
}