forked from FirestarterUA/shop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plugin.php
112 lines (101 loc) · 4.02 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
105
106
107
108
109
110
111
112
<?php namespace Firestarter\Shop;
use Backend;
use Controller;
use System\Classes\PluginBase;
/**
* Shop Plugin Information File
*/
class Plugin extends PluginBase
{
public $require = ['RainLab.Translate'];
/**
* Returns information about this plugin.
*
* @return array
*/
public function pluginDetails()
{
return [
'name' => 'firestarter.shop::lang.plugin.name',
'description' => 'firestarter.shop::lang.plugin.description',
'author' => 'Firestarter',
'icon' => 'icon-shopping-cart'
];
}
public function registerComponents()
{
return [
'Firestarter\Shop\Components\Products' => 'shopProducts',
'Firestarter\Shop\Components\Product' => 'shopProduct',
];
}
public function registerMailTemplates()
{
return [
'firestarter.shop::mail.license' => 'Шаблон письма с лицензией на цифровый товар',
];
}
public function registerNavigation()
{
return [
'shop' => [
'label' => 'firestarter.shop::lang.shop.menu_label',
'url' => Backend::url('firestarter/shop/products'),
'icon' => 'icon-shopping-cart',
'permissions' => ['firestarter.shop.*'],
'order' => 500,
'sideMenu' => [
'products' => [
'label' => 'firestarter.shop::lang.shop.products',
'icon' => 'icon-copy',
'url' => Backend::url('firestarter/shop/products'),
'permissions' => ['firestarter.shop.access_products'],
],
'categories' => [
'label' => 'firestarter.shop::lang.shop.categories',
'icon' => 'icon-copy',
'url' => Backend::url('firestarter/shop/cats'),
'permissions' => ['firestarter.shop.access_categories'],
],
'vendors' => [
'label' => 'firestarter.shop::lang.shop.vendors',
'icon' => 'icon-copy',
'url' => Backend::url('firestarter/shop/vendors'),
'permissions' => ['firestarter.shop.access_categories'],
],
'currencies' => [
'label' => 'firestarter.shop::lang.shop.currencies',
'icon' => 'icon-copy',
'url' => Backend::url('firestarter/shop/currencies'),
'permissions' => ['firestarter.shop.access_coupons'],
],
'orders' => [
'label' => 'firestarter.shop::lang.shop.orders',
'icon' => 'icon-copy',
'url' => Backend::url('firestarter/shop/orders'),
'permissions' => ['firestarter.shop.access_orders'],
],
'coupons' => [
'label' => 'firestarter.shop::lang.shop.coupons',
'icon' => 'icon-copy',
'url' => Backend::url('firestarter/shop/coupons'),
'permissions' => ['firestarter.shop.access_coupons'],
],
]
]
];
}
public function registerSettings()
{
return [
'settings' => [
'label' => 'firestarter.shop::lang.shop.settings',
'description' => 'firestarter.shop::lang.shop.settings_description',
'category' => 'Shop',
'icon' => 'icon-credit-card',
'class' => 'Firestarter\Shop\Models\Settings',
'order' => 500,
],
];
}
}