-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plugin.php
71 lines (66 loc) · 2.15 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
<?php
namespace JeroenvanRensen\Blog;
use Backend\Facades\Backend;
use System\Classes\PluginBase;
class Plugin extends PluginBase
{
/**
* Returns the details about this plugin.
*
* @return array
*/
public function pluginDetails()
{
return [
'name' => 'jeroenvanrensen.blog::lang.plugin.name',
'description' => 'jeroenvanrensen.blog::lang.plugin.description',
'author' => 'JeroenvanRensen',
'homepage' => 'https://www.jeroenvanrensen.nl/',
'icon' => 'icon-pencil'
];
}
/**
* Register all the components which belong to this plugin.
*
* @return array
*/
public function registerComponents()
{
return [
'JeroenvanRensen\Blog\Components\BlogPosts' => 'blogPosts',
'JeroenvanRensen\Blog\Components\BlogPost' => 'blogPost',
];
}
/**
* Register backend navigation for this plugin.
*
* @return array
*/
public function registerNavigation()
{
return [
'blog' => [
'label' => 'jeroenvanrensen.blog::lang.plugin.name',
'url' => Backend::url('jeroenvanrensen/blog/posts'),
'icon' => 'icon-pencil',
'sideMenu' => [
'newPost' => [
'label' => 'jeroenvanrensen.blog::lang.plugin.navigation.new_post',
'url' => Backend::url('jeroenvanrensen/blog/posts/create'),
'icon' => 'icon-plus'
],
'allPosts' => [
'label' => 'jeroenvanrensen.blog::lang.plugin.navigation.all_posts',
'url' => Backend::url('jeroenvanrensen/blog/posts'),
'icon' => 'icon-copy'
],
'categories' => [
'label' => 'jeroenvanrensen.blog::lang.plugin.navigation.categories',
'url' => Backend::url('jeroenvanrensen/blog/categories'),
'icon' => 'icon-list'
]
]
]
];
}
}