ServicePagesController.php
2.75 KB
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
<?php
class ServicePagesController extends AdminController
{
public function actions()
{
return array(
'index' => array(
'class' => 'StaticPageEditor',
'submitLabel' => 'Сохранить',
'section' => 'service',
'key' => 'index',
'view' => '/static_editor',
'model' => array(
'schema' => array(
'contacts' => array(
'label' => 'Контакты',
'default' => '',
),
),
'rules' => array(),
),
'form' => array(
array(
'type' => 'inputWidget',
'class' => 'ContactsSelect',
'attribute' => 'contacts',
'config' => array(),
),
),
'i18nModel' => array(
'schema' => array(
'content1' => array(
'label' => 'Содержимое страницы до списка сервисов',
'default' => null,
),
'content2' => array(
'label' => 'Содержимое страницы после списка сервисов',
'default' => null,
),
),
'rules' => array(),
),
'i18nForm' => array(
array(
'type' => 'inputWidget',
'class' => 'TinyMce',
'attribute' => 'content1',
'config' => array(),
),
array(
'type' => 'inputWidget',
'class' => 'TinyMce',
'attribute' => 'content2',
'config' => array(),
),
),
),
);
}
public function getSideMenu()
{
$res = array(
array(
'label' => 'Страницы',
'items' => array(
array(
'label' => 'Главная страница раздела',
'url' => array('/' . $this->module->id . '/' . $this->id . '/index'),
'icon' => 'icon-file',
'active' => '/' . $this->module->id . '\/' . $this->id . '\/index/',
),
),
),
);
return $res;
}
}