/
Plugin.php
74 lines (65 loc) · 1.97 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
<?php namespace ZaWeb\Octoportfolio;
use Backend\Facades\Backend;
use System\Classes\PluginBase;
/**
* octoportfolio Plugin Information File
*/
class Plugin extends PluginBase
{
/**
* Returns information about this plugin.
*
* @return array
*/
public function pluginDetails()
{
return [
'name' => 'zaweb.octoportfolio::lang.plugin.name',
'description' => 'zaweb.octoportfolio::lang.plugin.description',
'author' => 'Za-web',
'icon' => 'icon-clipboard'
];
}
/**
* Register components
*
* @return array
*/
public function registerComponents()
{
return [
'ZaWeb\Octoportfolio\Components\Jobs' => 'portfolio',
'ZaWeb\Octoportfolio\Components\Job' => 'job',
'ZaWeb\Octoportfolio\Components\Categories' => 'categories',
];
}
/**
* Register backend navigation
*
* @return array
*/
public function registerNavigation()
{
return [
'octoportfolio' => [
'label' => 'zaweb.octoportfolio::lang.navigation.main',
'url' => Backend::url('zaweb/octoportfolio/jobs'),
'icon' => 'icon-clipboard',
'permissions' => ['octoportfolio.*'],
'order' => '500',
'sideMenu' => [
'jobs' => [
'label' => 'zaweb.octoportfolio::lang.navigation.side.jobs',
'url' => Backend::url('zaweb/octoportfolio/jobs'),
'icon' => 'icon-clipboard',
],
'categories' => [
'label' => 'zaweb.octoportfolio::lang.navigation.side.categories',
'url' => Backend::url('zaweb/octoportfolio/categories'),
'icon' => 'icon-list'
]
]
]
];
}
}