syntax error, unexpected 'if' (T_IF), expecting ']'
1. in /var/www/u0498223/public_html/coinfactory.pw/views/layouts/main.php at line 75
66 'url' => ['/cabinet/index'],
67 'options' => ['class' => 'menu-item']
68 ],
69 Yii::$app->user->isGuest ? '':
70 [
71 'label' => 'Партнёрам',
72 'url' => ['/partner/index'],
73 'options' => ['class' => 'menu-item']
74 ],
75 if (Yii::$app->user->isGuest):
76 [
77 'label' => 'Регистрация',
78 'url' => ['/user/reg'],
79 'options' => ['class' => 'menu-item']
80 ],
81 [
82 'label' => 'Войти',
83 'url' => ['/user/login'],
84 'options' => ['class' => 'menu-item']
2. yii\base\ErrorHandler::handleFatalError()
44 <?
45 $menuItems = array_filter([
46 // Important: you need to specify url as 'controller/action',
47 // not just as 'controller' even if default action is used.
48 [
49 'label' => 'Главная',
50 'url' => ['/site/index'],
51 'options' => ['class' => 'menu-item']
52 ],
53 [
54 'label' => 'О Нас',
55 'url' => ['/site/about'],
56 'options' => ['class' => 'menu-item']
57 ],
58 [
59 'label' => 'Контакты',
60 'url' => ['/site/contact'],
61 'options' => ['class' => 'menu-item']
62 ],
63 Yii::$app->user->isGuest ? '':
64 [
65 'label' => 'Кабинет',
66 'url' => ['/cabinet/index'],
67 'options' => ['class' => 'menu-item']
68 ],
69 Yii::$app->user->isGuest ? '':
70 [
71 'label' => 'Партнёрам',
72 'url' => ['/partner/index'],
73 'options' => ['class' => 'menu-item']
74 ],
75 if (Yii::$app->user->isGuest):
76 [
77 'label' => 'Регистрация',
78 'url' => ['/user/reg'],
79 'options' => ['class' => 'menu-item']
80 ],
81 [
82 'label' => 'Войти',
83 'url' => ['/user/login'],
84 'options' => ['class' => 'menu-item']
85 ],
86 else:
87 [
88 'label' => 'Выйти ('.Yii::$app->user->identity['username'].')',
89 'url' => ['/user/logout'],
90 'template' => '<a href="{url}", data-method="post">{label}</a>',
91 'options' => ['class' => 'menu-item',],
92 'linkOptions' => ['data-method' => 'post']
93 ],
94 endif;
95 )];
96 echo Menu::widget([
97 'items' => $menuItems,
98 'options' => ['class' => 'reset', 'role' => 'navigation'],
99
100 ]);?>
Yii::$app->user->isGuest ? '':
[
'label' => 'Партнёрам',
'url' => ['/partner/index'],
'options' => ['class' => 'menu-item']
],
[
'label' => 'Партнёрам',
'url' => ['/partner/index'],
'options' => ['class' => 'menu-item'],
'visible' => !Yii::$app->user->isGuest
],