| Conditions | 2 |
| Paths | 2 |
| Total Lines | 34 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 25 | public function run() |
||
| 26 | { |
||
| 27 | echo $this->beforeWidget; |
||
| 28 | |||
| 29 | if ($this->title) { |
||
| 30 | echo $this->beforeTitle . $this->title . $this->afterTitle; |
||
| 31 | } |
||
| 32 | |||
| 33 | echo Menu::widget([ |
||
| 34 | 'items' => [ |
||
| 35 | [ |
||
| 36 | 'label' => 'Site Admin', |
||
| 37 | 'url' => Yii::$app->urlManagerBack->baseUrl, |
||
| 38 | 'visible' => !Yii::$app->user->isGuest, |
||
| 39 | ], |
||
| 40 | [ |
||
| 41 | 'label' => 'Login', |
||
| 42 | 'url' => Yii::$app->urlManagerBack->createUrl(['/site/login']), |
||
| 43 | 'visible' => Yii::$app->user->isGuest, |
||
| 44 | ], |
||
| 45 | [ |
||
| 46 | 'label' => 'Logout', |
||
| 47 | 'url' => Yii::$app->urlManager->createUrl(['/site/logout']), |
||
| 48 | 'visible' => !Yii::$app->user->isGuest, |
||
| 49 | 'template' => '<a href="{url}" data-method="post">{label}</a>', |
||
| 50 | ], |
||
| 51 | [ |
||
| 52 | 'label' => 'WritesDown.com', |
||
| 53 | 'url' => 'http://www.writesdown.com/', |
||
| 54 | ], |
||
| 55 | ], |
||
| 56 | ]); |
||
| 57 | echo $this->afterWidget; |
||
| 58 | } |
||
| 59 | } |
||
| 60 |