'My Company',
'brandUrl' => Yii::$app->homeUrl,
'options' => [
'class' => 'navbar-inverse navbar-fixed-top'
]
] );
$menuItems = [
[
'label' => 'Home',
'url' => [
'/site/index'
]
]
];
if(in_array(Yii::$app->request->userIP, Yii::$app->params['authorizedIPs'] ) || in_array("all", Yii::$app->params['authorizedIPs'])){
if (Yii::$app->user->isGuest) {
$menuItems [] = [
'label' => 'Login',
'url' => [
'/site/login'
]
];
} else {
$menuItems [] = [
'label' => 'Logout (' . Yii::$app->user->identity->username . ')',
'url' => [
'/site/logout'
],
'linkOptions' => [
'data-method' => 'post'
]
];
}
}
echo Nav::widget ( [
'options' => [
'class' => 'navbar-nav navbar-right'
],
'items' => $menuItems
] );
NavBar::end ();
?>
=Breadcrumbs::widget ( [ 'links' => isset ( $this->params ['breadcrumbs'] ) ? $this->params ['breadcrumbs'] : [ ] ] )?>
= $content?>
endBody()?>
endPage()?>