-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPlugin.php
73 lines (65 loc) · 1.81 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
<?php
namespace GinoPane\AwesomeIconsList;
use GinoPane\AwesomeIconsList\Components\FontAwesomeCssLink;
use GinoPane\AwesomeIconsList\FormWidgets\AwesomeIconsList;
use GinoPane\AwesomeIconsList\Models\Settings;
use System\Classes\PluginBase;
/**
* Class Plugin
*
* @package GinoPane\AwesomeIconsList
*/
class Plugin extends PluginBase
{
const DEFAULT_ICON = 'icon-magic';
const LOCALIZATION_KEY = 'ginopane.awesomeiconslist::lang.';
/**
* Returns information about this plugin
*
* @return array
*/
public function pluginDetails(): array
{
return [
'name' => self::LOCALIZATION_KEY . 'plugin.name',
'description' => self::LOCALIZATION_KEY . 'plugin.description',
'author' => 'Siarhei <Gino Pane> Karavai',
'icon' => self::DEFAULT_ICON,
'homepage' => 'https://github.com/ginopane/oc-awesomeiconslist-plugin'
];
}
public function registerFormWidgets(): array
{
return [
AwesomeIconsList::class => AwesomeIconsList::DEFAULT_ALIAS
];
}
/**
* Register components
*
* @return array
*/
public function registerComponents(): array
{
return [
FontAwesomeCssLink::class => FontAwesomeCssLink::NAME,
];
}
/**
* Register plugin settings
*
* @return array
*/
public function registerSettings(): array
{
return [
'settings' => [
'label' => self::LOCALIZATION_KEY . 'settings.name',
'description' => self::LOCALIZATION_KEY . 'settings.description',
'icon' => self::DEFAULT_ICON,
'class' => Settings::class,
'order' => 100
]
];
}
}