1a7c87b9
Alexey Boroda
-Image manager in...
|
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
|
<?php
use yii\web\UrlManager;
$homeLink = [];
/**
* @var UrlManager $urlManagerFrontend
*/
if ($urlManagerFrontend = \Yii::$app->get('urlManagerFrontend', false)) {
$homeLink = [
[
'label' => \Yii::t('core', 'My website'),
'url' => $urlManagerFrontend->createUrl([ 'site/index' ]),
'icon' => 'home',
'template' => '<a href="{url}" target="_blank">{icon}<span>{label}</span>{badge}</a>',
'options' => [
'class' => 'homepage_link',
],
],
];
}
return array_merge(
$homeLink,
[
[
'label' => \Yii::t('core', 'Main'),
'url' => [ '/site/index' ],
'icon' => ( \Yii::$app->controller->id === 'site' ) ? 'check' : 'undo',
'active' => function () {
return \Yii::$app->controller->id === 'site';
},
],
[
'label' => \Yii::t('core', 'Static pages'),
|
68bb4394
Alexey Boroda
-Menu items fixed
|
34
|
'url' => [ '/page/index' ],
|
1a7c87b9
Alexey Boroda
-Image manager in...
|
35
36
37
38
39
40
41
42
43
44
45
46
|
'icon' => 'file-text',
'active' => function () {
return \Yii::$app->controller->id === 'page';
},
],
[
'label' => \Yii::t('core', 'SEO'),
'url' => '#',
'icon' => 'bolt',
'items' => [
[
'label' => \Yii::t('core', 'Seo pages'),
|
68bb4394
Alexey Boroda
-Menu items fixed
|
47
|
'url' => [ '/alias/index' ],
|
1a7c87b9
Alexey Boroda
-Image manager in...
|
48
49
50
51
|
'icon' => 'file-text',
],
[
'label' => \Yii::t('core', 'Robots'),
|
68bb4394
Alexey Boroda
-Menu items fixed
|
52
|
'url' => [ '/settings/robots' ],
|
1a7c87b9
Alexey Boroda
-Image manager in...
|
53
54
55
56
|
'icon' => 'android',
],
[
'label' => \Yii::t('core', 'Codes'),
|
68bb4394
Alexey Boroda
-Menu items fixed
|
57
|
'url' => [ '/settings/codes' ],
|
1a7c87b9
Alexey Boroda
-Image manager in...
|
58
59
60
61
62
63
64
65
66
|
'icon' => 'code',
],
[
'label' => \Yii::t('core', 'Sitemap'),
'url' => [ '/sitemap/index' ],
'icon' => 'map-signs',
],
],
],
|
6ae24cca
Alexey Boroda
-Image manager ready
|
67
68
69
70
71
|
[
'label' => \Yii::t('imagemanager', 'Image manager'),
'url' => [ '/imagemanager' ],
'icon' => 'image',
'active' => function () {
|
0e3f5867
Alexey Boroda
-Menu fixed
|
72
|
return \Yii::$app->controller->id === 'imagemanager';
|
6ae24cca
Alexey Boroda
-Image manager ready
|
73
74
|
},
],
|
1a7c87b9
Alexey Boroda
-Image manager in...
|
75
76
|
]
);
|