-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlugin.php
48 lines (43 loc) · 1.52 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
<?php namespace WebVPF\Robots;
use Backend\Models\UserRole;
use System\Classes\PluginBase;
use System\Classes\SettingsManager;
class Plugin extends PluginBase
{
public function pluginDetails(): array
{
return [
'name' => 'webvpf.robots::lang.plugin.name',
'description' => 'webvpf.robots::lang.plugin.description',
'author' => 'WebVPF',
'icon' => 'icon-robot',
'homepage' => 'https://github.com/WebVPF/wn-robots-plugin',
];
}
public function registerPermissions(): array
{
return [
'webvpf.robots' => [
'tab' => 'webvpf.robots::lang.plugin.name',
'label' => 'webvpf.robots::lang.permissions.access',
'roles' => [UserRole::CODE_DEVELOPER],
],
];
}
public function registerSettings(): array
{
$laravel_version = explode('.', \Illuminate\Foundation\Application::VERSION)[0];
return [
'txt' => [
'label' => 'Robots.txt',
'description' => 'webvpf.robots::lang.settings.menu_desc',
'category' => SettingsManager::CATEGORY_CMS,
'icon' => $laravel_version < 9 ? 'icon-android' : 'icon-robot',
'class' => \WebVPF\Robots\Models\Txt::class,
'order' => 299,
'keywords' => 'robots seo',
'permissions' => ['webvpf.robots'],
],
];
}
}