-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlugin.php
104 lines (95 loc) · 3.54 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php namespace Hounddd\lightGallery;
use App;
use Event;
use Backend;
use System\Classes\PluginBase;
/**
* galleries Plugin Information File
*/
class Plugin extends PluginBase
{
/**
* Returns information about this plugin.
*
* @return array
*/
public function pluginDetails()
{
return [
'name' => 'hounddd.lightgallery::lang.plugin.name',
'description' => 'hounddd.lightgallery::lang.plugin.description',
'author' => 'Hounddd',
'icon' => 'icon-picture-o',
'homepage' => 'https://github.com/Hounddd/wn-lightgallery-plugin',
'replaces' => [
'Raviraj.Rjgallery' => '<=1.2.2'
],
];
}
public function registerComponents()
{
return [
'Hounddd\lightGallery\Components\Galleries' => 'galleriesList',
'Hounddd\lightGallery\Components\GallerySlug' => 'gallerySlug',
];
}
public function registerPageSnippets()
{
return [
'Hounddd\lightGallery\Components\GalleryId' => 'galleryId',
];
}
public function registerBlocks(): array
{
return [
'lightgallery_gallery' => '$/hounddd/lightgallery/blocks/images_gallery.block',
];
}
public function registerNavigation()
{
return [
'gallery' => [
'label' => 'hounddd.lightgallery::lang.common.menu_label',
'url' => Backend::url('hounddd/lightgallery/galleries'),
'icon' => 'icon-picture-o',
'permissions' => ['hounddd.lightgallery.*'],
'order' => 500,
'sideMenu' => [
'new_gallery' => [
'label' => 'hounddd.lightgallery::lang.galleries.new_gallery',
'icon' => 'icon-plus',
'url' => Backend::url('hounddd/lightgallery/galleries/create'),
'permissions' => ['hounddd.lightgallery.access_galleries']
],
'galleries' => [
'label' => 'hounddd.lightgallery::lang.common.galleries',
'icon' => 'icon-file-image-o',
'url' => Backend::url('hounddd/lightgallery/galleries'),
'permissions' => ['hounddd.lightgallery.access_galleries']
],
'new_category' => [
'label' => 'hounddd.lightgallery::lang.categories.new_category',
'icon' => 'icon-plus',
'url' => Backend::url('hounddd/lightgallery/categories/create'),
'permissions' => ['hounddd.lightgallery.access_galleries']
],
'categories' => [
'label' => 'hounddd.lightgallery::lang.common.categories',
'icon' => 'icon-list',
'url' => Backend::url('hounddd/lightgallery/categories'),
'permissions' => ['hounddd.lightgallery.access_categories']
]
]
],
];
}
public function registerPermissions()
{
return [
'hounddd.lightgallery.*' => [
'tab' => 'hounddd.lightgallery::lang.plugin.name',
'label' => 'hounddd.lightgallery::lang.permissions.all'
]
];
}
}