Conditions | 2 |
Paths | 2 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
17 | public function items() |
||
18 | { |
||
19 | $logOp = Yii::$app->user->isGuest ? 'login' : 'logout'; |
||
20 | |||
21 | return [ |
||
22 | 'home' => [ |
||
23 | 'label' => Yii::t('hisite', 'Home'), |
||
24 | 'url' => ['/site/index'], |
||
25 | ], |
||
26 | 'about' => [ |
||
27 | 'label' => Yii::t('hisite', 'About'), |
||
28 | 'url' => ['/site/about'], |
||
29 | ], |
||
30 | 'contact' => [ |
||
31 | 'label' => Yii::t('hisite', 'Contact'), |
||
32 | 'url' => ['/site/contact'], |
||
33 | ], |
||
34 | $logOp => [ |
||
35 | 'label' => Yii::t('hisite', ucfirst($logOp)), |
||
36 | 'url' => ['/site/' . $logOp], |
||
37 | ], |
||
38 | ]; |
||
39 | } |
||
40 | } |
||
41 |