-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOfferModule.php
102 lines (88 loc) · 2.53 KB
/
OfferModule.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
<?php
/**
* OfferModule основной класс модуля предложений
*
* @author apexwire <[email protected]>
* @link http://yupe.ru
* @copyright 2009-2015 amyLabs && Yupe! team
* @package yupe.modules.offer
* @since 0.1
*/
class OfferModule extends yupe\components\WebModule
{
const VERSION = '0.1';
public function getDependencies()
{
return [
'user',
];
}
public function getCategory()
{
return Yii::t('YupeModule.yupe', 'Content');
}
public function getName()
{
return Yii::t('OfferModule.offer', 'Offers');
}
public function getDescription()
{
return Yii::t('OfferModule.offer', 'Module for creating and manage offers');
}
public function getAuthor()
{
return Yii::t('OfferModule.offer', 'apexwire');
}
public function getAuthorEmail()
{
return Yii::t('OfferModule.offer', '[email protected]');
}
public function getUrl()
{
return Yii::t('OfferModule.offer', 'http://yupe.ru');
}
public function getIcon()
{
return "fa fa-fw fa-list";
}
public function init()
{
parent::init();
$import = ['application.modules.offer.models.*'];
if ( Yii::app()->hasModule('groups') ) {
$import[] = 'application.modules.groups.models.*';
}
$this->setImport($import);
}
public function getAdminPageLink()
{
return '/offer/offerBackend/index';
}
public function getNavigation()
{
return [
['label' => Yii::t('OfferModule.offer', 'Offers')],
[
'icon' => 'fa fa-fw fa-list',
'label' => Yii::t('OfferModule.offer', 'Offers list'),
'url' => ['/offer/offerBackend/index']
],
[
'icon' => 'fa fa-fw fa-plus-square',
'label' => Yii::t('OfferModule.offer', 'Create offer'),
'url' => ['/offer/offerBackend/create']
],
['label' => Yii::t('OfferModule.offer', 'Offers type')],
[
'icon' => 'fa fa-fw fa-list',
'label' => Yii::t('OfferModule.offer', 'Types list'),
'url' => ['/offer/offerTypeBackend/index']
],
[
'icon' => 'fa fa-fw fa-plus-square',
'label' => Yii::t('OfferModule.offer', 'Create type'),
'url' => ['/offer/offerTypeBackend/create']
],
];
}
}