forked from Samuell1/contenteditor-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlugin.php
62 lines (55 loc) · 1.55 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
<?php
namespace Samuell\ContentEditor;
use System\Classes\PluginBase;
/**
* ContentEditor Plugin Information File
*/
class Plugin extends PluginBase
{
/**
* Returns information about this plugin.
*
* @return array
*/
public function pluginDetails()
{
return [
'name' => 'Content Editor',
'description' => 'Front-end content editor',
'author' => 'Samuell',
'icon' => 'icon-edit'
];
}
public function registerComponents()
{
return [
'Samuell\ContentEditor\Components\ContentEditor' => 'contenteditor',
];
}
public function registerSettings()
{
return [
'settings' => [
'label' => 'Content Editor Settings',
'description' => 'Manage main editor settings.',
'icon' => 'icon-cog',
'class' => 'Samuell\ContentEditor\Models\Settings',
'order' => 500,
'permissions' => ['samuell.contenteditor.access_settings']
]
];
}
public function registerPermissions()
{
return [
'samuell.contenteditor.editor' => [
'tab' => 'Content Editor',
'label' => 'Allow to use content editor on frontend'
],
'samuell.contenteditor.access_settings' => [
'tab' => 'Content Editor',
'label' => 'Access content editor settings'
],
];
}
}