-
Notifications
You must be signed in to change notification settings - Fork 4
/
Plugin.php
31 lines (27 loc) · 943 Bytes
/
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
<?php namespace WebVPF\DarkBackend;
use System\Classes\PluginBase;
use App;
use Event;
class Plugin extends PluginBase
{
public function pluginDetails(): array
{
return [
'name' => 'webvpf.darkbackend::lang.plugin.name',
'description' => 'webvpf.darkbackend::lang.plugin.desc',
'author' => 'WebVPF',
'icon' => 'icon-adjust',
'homepage' => 'https://github.com/WebVPF/wn-darkbackend-plugin',
];
}
public function boot(): void
{
if (!App::runningInBackend()) {
return;
}
Event::listen('backend.page.beforeDisplay', function($controller, $action, $params) {
$controller->addCss('/plugins/webvpf/darkbackend/assets/css/dark.css', 'WebVPF.DarkBackend');
$controller->addJs('/plugins/webvpf/darkbackend/assets/js/script.js', 'WebVPF.DarkBackend');
});
}
}