当前位置: 首页>>代码示例>>PHP>>正文


PHP NavBar::end方法代码示例

本文整理汇总了PHP中yii\bootstrap\NavBar::end方法的典型用法代码示例。如果您正苦于以下问题:PHP NavBar::end方法的具体用法?PHP NavBar::end怎么用?PHP NavBar::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\bootstrap\NavBar的用法示例。


在下文中一共展示了NavBar::end方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run()
 {
     NavBar::begin(['brandLabel' => false, 'options' => ['class' => 'tor-nav']]);
     echo Html::tag('div', $this->torMenu(), ['class' => 'container']);
     NavBar::end();
     $view = $this->view;
     NavAsset::register($view);
 }
开发者ID:mark38,项目名称:yii2-tor,代码行数:8,代码来源:Tor.php

示例2: run

 public function run()
 {
     NavBar::begin(['brandLabel' => false, 'options' => ['class' => 'top-nav']]);
     echo NavX::widget(['items' => $this->topMenu(), 'options' => ['class' => 'nav navbar-nav navbar-left nav-pills main-nav'], 'encodeLabels' => false]);
     echo NavX::widget(['items' => $this->accountMenu(), 'options' => ['class' => 'nav navbar-nav navbar-right nav-pills account-top-nav'], 'encodeLabels' => false]);
     NavBar::end();
     $view = $this->view;
     NavAsset::register($view);
 }
开发者ID:mark38,项目名称:yii2-tor,代码行数:9,代码来源:Top.php

示例3: renderToolbar

 /**
  * Renders mini-toolbar at the end of page body.
  *
  * @param \yii\base\Event $event
  */
 public function renderToolbar($event)
 {
     /* @var $view View */
     /* @var $urlManagerBack \yii\web\UrlManager */
     $urlManagerBack = Yii::$app->urlManagerBack;
     $view = $event->sender;
     $view->registerCss($view->renderPhpFile(__DIR__ . '/assets/toolbar.min.css'));
     NavBar::begin(['id' => 'wd-frontend-toolbar', 'brandLabel' => Html::img('@web/img/logo-mini.png'), 'brandUrl' => $urlManagerBack->baseUrl, 'innerContainerOptions' => ['class' => 'container-fluid'], 'options' => ['class' => 'navbar navbar-inverse navbar-fixed-top']]);
     echo Nav::widget(['encodeLabels' => false, 'options' => ['class' => 'navbar-nav'], 'items' => [['label' => '<span aria-hidden="true" class="glyphicon glyphicon-dashboard"></span> ' . Option::get('sitetitle'), 'items' => [['label' => Yii::t('toolbar', 'Dashboard'), 'url' => $urlManagerBack->baseUrl], ['label' => Yii::t('toolbar', 'Themes'), 'url' => $urlManagerBack->createUrl(['/theme']), 'visible' => Yii::$app->user->can('administrator')], ['label' => Yii::t('toolbar', 'Menus'), 'url' => $urlManagerBack->createUrl(['/menu']), 'visible' => Yii::$app->user->can('administrator')], ['label' => Yii::t('toolbar', 'Modules'), 'url' => $urlManagerBack->createUrl(['/module']), 'visible' => Yii::$app->user->can('administrator')], ['label' => Yii::t('toolbar', 'Widgets'), 'url' => $urlManagerBack->createUrl(['/widget']), 'visible' => Yii::$app->user->can('administrator')]]], ['label' => '<span aria-hidden="true" class="glyphicon glyphicon-plus"></span> ' . Yii::t('toolbar', 'New'), 'items' => $this->getAddNewMenu() ? $this->getAddNewMenu() : null]]]);
     echo Nav::widget(['encodeLabels' => false, 'options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => '<span aria-hidden="true" class="glyphicon glyphicon-user"></span> ' . Yii::$app->user->identity->username, 'items' => [['label' => 'Profile', 'url' => $urlManagerBack->createUrl(['/user/profile'])], ['label' => 'Logout', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]]]]]);
     NavBar::end();
 }
开发者ID:ochiem,项目名称:app-cms,代码行数:17,代码来源:Module.php

示例4: getMenu

 public function getMenu()
 {
     $isAdmin = !Yii::$app->user->isGuest ? Yii::$app->user->identity->can('editor') : false;
     $canAdmin = !Yii::$app->user->isGuest ? Yii::$app->user->identity->can('editor') : false;
     $networksVisible = count(Yii::$app->authClientCollection->clients) > 0;
     $menuItems = [['label' => 'Home', 'url' => ['/site/index']], ['label' => 'About', 'url' => ['/site/about']], ['label' => 'Contact', 'url' => ['/site/contact']]];
     if (Yii::$app->user->isGuest) {
         $menuItems[] = ['label' => Yii::t('user', 'Sign up'), 'url' => ['/user/registration/register']];
         $menuItems[] = ['label' => Yii::t('user', 'Sign in'), 'url' => ['/user/security/login']];
     } else {
         $menuItems['user'] = ['label' => $isAdmin ? Yii::$app->user->identity->profile->fullname . ' (admin)' : Yii::$app->user->identity->profile->fullname, 'items' => [['label' => Yii::t('user', 'Profile'), 'url' => ['/user/settings/profile']], ['label' => Yii::t('user', 'Account'), 'url' => ['/user/settings/account']], ['label' => Yii::t('user', 'Networks'), 'url' => ['/user/settings/networks'], 'visible' => $networksVisible], '<li class="divider"></li>', ['label' => Yii::t('user', 'Logout'), 'url' => ['/user/security/logout'], 'linkOptions' => ['data-method' => 'post']]]];
     }
     if ($canAdmin) {
         $menuItems['user']['items'][] = '<li class="divider"></li>';
         $menuItems['user']['items'][] = ['label' => Yii::t('user', 'Admin Panel'), 'url' => Yii::$app->urlManagerBackEnd->createUrl('')];
     }
     NavBar::begin(['brandLabel' => Yii::$app->params['companyName'], 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
     echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]);
     NavBar::end();
 }
开发者ID:pc-brainy,项目名称:blitz,代码行数:20,代码来源:topmenu.php

示例5: isset

?>
</title>
    <?php 
$this->head();
?>
</head>
<body>
<?php 
$this->beginBody();
?>

<div class="wrap">
    <?php 
NavBar::begin(['brandLabel' => \Yii::$app->name, 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse']]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'События', 'items' => [['label' => 'Категории', 'url' => ['/article/category']], ['label' => 'Список', 'url' => ['/article/events']]]], ['label' => 'Каталог', 'items' => [['url' => ['/catalog/category'], 'label' => 'Категории'], ['url' => ['/catalog/brand'], 'label' => 'Бренды']]], ['label' => 'Настройки', 'url' => ['/settings/settings']], Yii::$app->user->isGuest ? ['label' => 'Login', 'url' => ['/site/login']] : ['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]]]);
NavBar::end();
?>

    <div class="container">
        <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        <?php 
echo $content;
?>
    </div>
</div>

<footer class="footer">
    <div class="container">
        <p class="pull-left">&copy; <?php 
开发者ID:ivphpan,项目名称:iris,代码行数:31,代码来源:admin.php

示例6: isset

$this->head();
?>
</head>
<body>
<?php 
$this->beginBody();
\yii\bootstrap\NavBar::begin(['brandLabel' => Yii::$app->siteName, 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
$items = [['label' => '<i class="glyphicon glyphicon-home"></i> ' . Yii::t('gromver.platform', 'Home'), 'url' => Yii::$app->homeUrl]];
if (Yii::$app->user->can('administrate')) {
    $items[] = ['label' => '<i class="glyphicon glyphicon-cog"></i> ' . Yii::t('gromver.platform', 'Admin Panel'), 'url' => ['/main/backend/default/index']];
}
if (Yii::$app->request->referrer) {
    $items[] = ['label' => '<i class="glyphicon glyphicon-step-backward"></i> ' . Yii::t('gromver.platform', 'Back'), 'url' => Yii::$app->request->referrer];
}
echo \yii\bootstrap\Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'encodeLabels' => false, 'items' => $items]);
\yii\bootstrap\NavBar::end();
?>

<div class="wrap">
    <div class="container">
        <?php 
echo \yii\widgets\Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        <?php 
foreach (Yii::$app->session->getAllFlashes() as $type => $body) {
    echo \kartik\widgets\Alert::widget(['type' => $type, 'body' => $body]);
}
?>
        <?php 
echo $content;
?>
开发者ID:ezsky,项目名称:yii2-platform-core,代码行数:31,代码来源:error.php

示例7: actionMenu

 public function actionMenu()
 {
     NavBar::begin(['brandLabel' => Yii::$app->name, 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse', 'style' => 'z-index: 9999;']]);
     echo MenuWidget::widget(['direction' => 'left', 'options' => ['class' => 'navbar-nav navbar-right']]);
     NavBar::end();
 }
开发者ID:bariew,项目名称:yii2-module-cms-module,代码行数:6,代码来源:ItemController.php


注:本文中的yii\bootstrap\NavBar::end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。