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


PHP Nav::widget方法代码示例

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


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

示例1: run

 public function run()
 {
     $user = User::findOne(Yii::$app->user->id);
     echo Nav::widget(['items' => [['label' => 'Контактная информация', 'url' => ['/tor/profile']], ['label' => 'Добавить лот на продажу', 'url' => ['/tor/mng-ad']], ['label' => 'Мои объявления <span class="badge">' . TorAds::find()->count() . '</span>', 'url' => ['/tor/my-ads']], ['label' => 'Пополнить баланс ', 'url' => ['/']], ['label' => 'История платежей', 'url' => ['/']], ['label' => 'Реферальная ссылка', 'url' => ['/']]], 'options' => ['class' => 'account-nav'], 'encodeLabels' => false]);
     $view = $this->view;
     NavAsset::register($view);
 }
开发者ID:mark38,项目名称:yii2-tor,代码行数:7,代码来源:Account.php

示例2: run

    public function run()
    {
        $chatModel = new \nitm\widgets\models\Replies(['constrain' => ['type' => 'chat']]);
        $notificationModel = new \nitm\widgets\models\Notification(['constrain' => ['user_id' => \Yii::$app->user->getId()], 'queryOptions' => ['read' => 0]]);
        $uniqid = uniqid();
        $chatWidget = Nav::widget(['encodeLabels' => false, 'options' => ['id' => 'communication-center-messages-wrapper' . $uniqid, 'class' => 'nav navbar-right navbar-nav'], 'items' => [['label' => Icon::show('comment') . Html::tag('span', $chatModel->hasNew(), ['class' => 'badge']), 'options' => ['class' => !$chatModel->hasNew() ? 'text-disabled' : 'text-success'], 'linkOptions' => ['id' => 'communication-center-messages-button' . $uniqid, 'title' => 'Click here again to refresh the info', 'role' => 'dynamicValue', 'data-run-once' => 1, 'data-animation-target' => '#chat' . $uniqid, 'data-animation-start-only' => 1, 'data-type' => 'html', 'data-id' => '#chat' . $uniqid, 'data-url' => \Yii::$app->urlManager->createUrl(['/reply/index/chat/0', '__format' => 'html', \nitm\widgets\models\Replies::FORM_PARAM => true])], 'items' => [['label' => Html::tag('div', Html::tag('h2', 'Loading Messages...', ['class' => 'text-center']) . Html::script('$("#communication-center-messages-button' . $uniqid . '").one("mouseover", function (event) {
								$(this).trigger("click");
							})', ['type' => 'text/javascript']), ['role' => 'chatParent', 'id' => 'chat' . $uniqid, 'class' => '']), 'options' => $this->contentOptions]]]]]);
        $alertWidget = Nav::widget(['encodeLabels' => false, 'options' => ['id' => 'communication-center-notifications-wrapper' . $uniqid, 'class' => 'nav navbar-right navbar-nav'], 'items' => [['label' => Icon::show('bell') . Html::tag('span', $notificationModel->count(), ['class' => 'badge']), 'options' => ['class' => !$notificationModel->count() ? 'bg-disabled' : 'bg-success'], 'linkOptions' => ['id' => 'communication-center-notifications-button' . $uniqid, 'title' => 'Click here again to refresh the info', 'role' => 'dynamicValue', 'data-run-once' => 1, 'data-animation-target' => '#communication-center-notifications' . $uniqid, 'data-animation-start-only' => 1, 'data-type' => 'html', 'data-id' => '#communication-center-notifications' . $uniqid, 'data-url' => \Yii::$app->urlManager->createUrl(['/alerts/notifications', '__format' => 'html'])], 'items' => [['label' => Html::tag('div', Html::tag('h2', 'Loading Alerts...', ['class' => 'text-center']) . Html::script('$("#communication-center-notifications-button' . $uniqid . '").one("mouseover", function (event) {
								$(this).trigger("click");
							})', ['type' => 'text/javascript']), ['id' => 'communication-center-notifications' . $uniqid, 'class' => '']), 'options' => $this->contentOptions]]]]]);
        $widget = $alertWidget . $chatWidget;
        //$js = "\$nitm.onModuleLoad('communication-center', function (module) {
        //	module.initChatTabs('#".$this->options['id']."');
        //});";
        $js = "";
        if ($this->chatUpdateOptions['enabled']) {
            $js .= "\$nitm.onModuleLoad('polling', function (module) {\r\n\t\t\t\tmodule.initPolling('chat', {\r\n\t\t\t\t\tenabled: true,\r\n\t\t\t\t\turl: '" . $this->chatUpdateOptions['url'] . "', \r\n\t\t\t\t\tinterval: " . $this->chatUpdateOptions['interval'] . ",\r\n\t\t\t\t\tcontainer: '#nitm-communication-center-widget" . $uniqid . "'\r\n\t\t\t\t}, {object: \$nitm.module('replies'), method: 'chatStatus'});\r\n\t\t\t});";
        }
        if ($this->notificationUpdateOptions['enabled']) {
            $js .= "\r\n\t\t\t\$nitm.onModuleLoad('polling', function (module) {\r\n\t\t\t\tmodule.initPolling('notifications', {\r\n\t\t\t\t\tenabled: true,\r\n\t\t\t\t\tinterval: " . $this->notificationUpdateOptions['interval'] . ",\r\n\t\t\t\t\turl: '" . $this->notificationUpdateOptions['url'] . "',\r\n\t\t\t\t\tcontainer: '#nitm-communication-center-widget" . $uniqid . "'\r\n\t\t\t\t}, {object: \$nitm.module('notifications'), method: 'notificationStatus'});\r\n\t\t\t});";
        }
        if ($js) {
            $js = Html::script($js, ['type' => 'text/javascript']);
        }
        return $widget . $js;
    }
开发者ID:nhatvuvan,项目名称:yii2-widgets,代码行数:27,代码来源:CommunicationCenter.php

示例3: run

 /**
  * @return string
  */
 public function run()
 {
     $list = [];
     list($route, $params) = Yii::$app->getUrlManager()->parseRequest(Yii::$app->getRequest());
     $params = ArrayHelper::merge($_GET, $params);
     $url = isset($params['route']) ? $params['route'] : $route;
     foreach ($this->languages as $row) {
         $list = ArrayHelper::merge($list, [['label' => $row['title'], 'url' => Yii::$app->urlManager->createUrl(ArrayHelper::merge($params, [$url, 'language' => $row['iso']]))]]);
     }
     return Nav::widget(['options' => $this->options, 'items' => [['label' => Language::getCurrentRecord()->title, 'items' => $list]]]);
 }
开发者ID:apurey,项目名称:cmf,代码行数:14,代码来源:LanguageWidget.php

示例4: testIds

    public function testIds()
    {
        Nav::$counter = 0;
        $out = Nav::widget(['items' => [['label' => 'Page1', 'content' => 'Page1'], ['label' => 'Dropdown1', 'items' => [['label' => 'Page2', 'content' => 'Page2'], ['label' => 'Page3', 'content' => 'Page3']]], ['label' => 'Dropdown2', 'visible' => false, 'items' => [['label' => 'Page4', 'content' => 'Page4'], ['label' => 'Page5', 'content' => 'Page5']]]]]);
        $expected = <<<EXPECTED
<ul id="w0" class="nav"><li><a href="#">Page1</a></li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Dropdown1 <b class="caret"></b></a><ul id="w1" class="dropdown-menu"><li class="dropdown-header">Page2</li>
<li class="dropdown-header">Page3</li></ul></li></ul>
EXPECTED;
        $this->assertEqualsWithoutLE($expected, $out);
    }
开发者ID:glcode,项目名称:yii2-2.0.3-annotated,代码行数:11,代码来源:NavTest.php

示例5: 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

示例6: run

 public function run()
 {
     $items[] = ['label' => '<span class="sr-only">Вид навигации</span>', 'url' => '#', 'linkOptions' => ['class' => 'sidebar-toggle hidden-xs', 'data-toggle' => 'offcanvas', 'role' => 'button']];
     $items[] = ['label' => 'Карта сайта', 'url' => ['/map/index'], 'active' => $this->active_module && $this->active_module->id == 'map' ? true : false];
     $modules = \common\models\main\Modules::find()->where(['visible' => 1])->orderBy(['seq' => SORT_ASC])->all();
     if ($modules) {
         $model_items = array();
         foreach ($modules as $model) {
             $model_items[] = ['label' => $model->name, 'url' => [$model->url]];
         }
         $items[] = ['label' => 'Модули', 'items' => $model_items];
     }
     echo Nav::widget(['items' => $items, 'options' => ['class' => 'nav navbar-nav'], 'encodeLabels' => false]);
 }
开发者ID:mark38,项目名称:yii2-site-mng,代码行数:14,代码来源:Modules.php

示例7: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->options['id'] = $this->id;
     echo Html::beginTag('div', $this->options);
     if ($this->header !== null) {
         $this->initTools();
         echo Html::beginTag('div', ['class' => 'x_title']);
         echo Html::tag('h2', ($this->icon !== null ? new Icon($this->icon) . ' ' : '') . $this->header);
         if (empty($this->tools) === false) {
             echo Nav::widget(['dropDownCaret' => '', 'items' => $this->tools, 'options' => ['class' => 'nav navbar-right panel_toolbox']]);
         }
         echo Html::tag('div', null, ['class' => 'clearfix']);
         echo Html::endTag('div');
     }
     echo Html::beginTag('div', ['class' => 'x_content', 'style' => $this->expandable === true ? 'display: none;' : null]);
 }
开发者ID:yiister,项目名称:yii2-gentelella,代码行数:20,代码来源:Panel.php

示例8: run

 /**
  * Выполнение виджета
  * @return string строка, содержащая HTML виджета
  */
 public function run()
 {
     //Заполнение заголовка
     if (isset($this->heading)) {
         $heading = '<div class="panel-heading">' . $this->heading . '</div>';
     } else {
         $heading = '';
     }
     //Заполнение подвала
     if (isset($this->footer)) {
         $footer = '<div class="panel-footer">' . $this->footer . '</div>';
     } else {
         $footer = '';
     }
     //Возврат результата
     return '<div class="panel ' . $this->type . '">' . $heading . '<div class="panel-body"> ' . Nav::widget(['options' => ['class' => 'nav-stacked'], 'items' => $this->items]) . ' </div>' . $footer . '</div>';
 }
开发者ID:timurmelnikov,项目名称:yii2-panel-menu,代码行数:21,代码来源:PanelMenu.php

示例9: run

    /**
     * Render the widget.
     */
    public function run()
    {
        $menuItems = [];
        if (Yii::$app->user->isGuest) {
            $menuItems[] = ['label' => 'Регистрация', 'url' => ['/site/signup']];
            $menuItems[] = ['label' => 'Войти', 'url' => ['/site/login']];
        } else {
            $menuItems[] = ['label' => 'Счета', 'url' => ['/accounts'], 'active' => $this->controller->id === 'accounts'];
            $menuItems[] = ['label' => 'Операции', 'url' => ['/transaction'], 'active' => $this->controller->id === 'transaction'];
            $menuItems[] = ['label' => 'Цели', 'url' => ['/targets'], 'active' => $this->controller->id === 'targets'];
            $menuItems[] = ['label' => 'Категории', 'url' => ['/category'], 'active' => $this->controller->id === 'category'];
            $menuItems[] = ['label' => Yii::$app->user->identity->username, 'items' => [['label' => 'Профиль', 'url' => ['/user-panel/settings']], ['label' => 'Выход', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]]];
        }
        $menus = Nav::widget(['options' => ['class' => 'nav navbar-nav navbar-right'], 'items' => $menuItems]);
        return $HTML = <<<HTML
                {$menus}
HTML;
    }
开发者ID:TF03,项目名称:yii2-advanced-def,代码行数:21,代码来源:MenusWidget.php

示例10: 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

示例11: isset

echo Html::encode($this->title);
?>
</title>
    <?php 
$this->head();
?>
</head>
<body>

<?php 
$this->beginBody();
?>
    <div class="wrap">
        <?php 
NavBar::begin(['brandLabel' => 'Проверка работы почты', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'Посылки', 'url' => ['/site/index']], ['label' => 'SMS', 'url' => ['/site/sms']], ['label' => 'Настройки', 'url' => ['/site/settings']]]]);
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">
开发者ID:djvolk,项目名称:post,代码行数:31,代码来源:main.php

示例12: isset

echo Html::encode($this->title);
?>
</title>
    <?php 
$this->head();
?>
</head>
<body>

<?php 
$this->beginBody();
?>
    <div class="wrap">
        <?php 
NavBar::begin(['brandLabel' => 'Библиотека', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [Yii::$app->user->isGuest ? ['label' => 'Вход', 'url' => ['/site/login']] : ['label' => 'Выйти (' . 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">
开发者ID:Godscreature,项目名称:Books,代码行数:31,代码来源:main.php

示例13: elseif

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

<div class="wrap">
    <?php 
NavBar::begin(['brandLabel' => 'Order Processing', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
if (Yii::$app->user->isGuest) {
    echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'Login', 'url' => ['/site/login']]]]);
} elseif (Yii::$app->user->identity->user_role_id === 1) {
    echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'User Roles', 'url' => ['/admin/userroles']], ['label' => 'Users', 'url' => ['/admin/users']], ['label' => 'Companies', 'url' => ['/admin/companies']], ['label' => 'Affiliates', 'url' => ['/admin/affiliates']], ['label' => 'Order Statuses', 'url' => ['/admin/orderstatuses']], ['label' => 'Orders', 'url' => ['/admin/orders']], ['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]]]);
} else {
    echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'Orders', 'url' => ['/orders']], ['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">
开发者ID:Andrew-Yanovich,项目名称:orderprocessing,代码行数:31,代码来源:main.php

示例14: isset

echo Html::encode($this->title);
?>
</title>
    <?php 
$this->head();
?>
</head>
<body>
<?php 
$this->beginBody();
?>

<div class="wrap">
    <?php 
NavBar::begin(['brandLabel' => \Yii::t('app', 'My Goals'), 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => Yii::$app->user->isGuest ? [] : [['label' => \Yii::t('dashboard', 'Dashboard'), 'url' => ['/dashboard/index']], ['label' => \Yii::t('task', 'Tasks'), 'url' => Task::urlToAll()], ['label' => \Yii::t('status', 'Statuses'), 'url' => ['/settings/status/index']], ['label' => \Yii::t('type', 'Types'), 'url' => ['/settings/type/index']], ['label' => \Yii::t('priority', 'Priorities'), 'url' => ['/settings/priority/index']], ['label' => \Yii::t('app', 'Logout ({0})', [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">
开发者ID:sapozhkov,项目名称:goal,代码行数:31,代码来源:main.php

示例15: reset

  <div class="clearfix"></div>
	<header class="navbar navbar-inverse navbar-static">
    	<div class="container">
            <div id="main-nav-head" class="navbar-header">
                <a href="<?php 
echo Yii::$app->homeUrl;
?>
" class="navbar-brand">
                    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKYAAAAkCAYAAAAD8EGkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADLAAAAywBkJQcgwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABQdEVYdENvcHlyaWdodABDQyBBdHRyaWJ1dGlvbi1Ob0Rlcml2cyBodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9ieS1uZC8zLjAvZYKKLAAAD61JREFUeJztW3mUFNW5/333VlU3BpnBDRdQXBCUw3RV0woqQSagEvQd43mKS8w7jnGJcYtLjEaj44lPE30afbgECepRkyhg3NAggmMAETg93dUzjtt4xB0FWYYRprun7v3eH1Xd09N0T2ZYRHz9O+eevrfuV99d+tff/b6vuoAKKqigggp6B9rRA8xqqbfa2j8bSJo7Lzh25rodPV4F3w/sMGLes/SYfh0G7tJaX6iZLcUMj7n+9uPit+6oMSv4/qAbMVeOHjrCDBs1sHAAwrSbDIl1sMTHltm5ZM+/frCxt0rvaBo30MzwQgY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LMJySTyX/mLGcymRyaTCafgJ8/vbo4MOotgiDv+eBID2+xxr4qTGe9c4oJmc56hUf5h+prXTYi/b4gFottBjARQJyZn6quru6orq7uIKInmPlpZv79jho7iOLHMXM7M7+WzWYzRPQ5M9/HzO92dHRs4UZprR8C8LbjOMUB1oPMPDcSiXxWfI9t268Q0U+IaJQQ4u1kMskAVgI4BcB5juP8ZVvWoZS6BMDAgQMH3lbc1+c8JjMmZjoVtPb/X8nM0Frm21rrXz9yxYjt8c54C/zkM+An18vhfPgOeC5w2BzcV/bdd6310UKI3v7SjxVCfFSqIxqNrgEwJR6Pj5BSjiaizQBWOI7zeTweryKi2OjRo/OBGzNfoZQquTda658GyfRSfVOK/7gcjUY/BjA+kUhEhBCjtNZpAEuj0egXZeb6ZiqVurL4eigUejKdTrtl1g7btue2trYe0t7ePo6IBjPzainlokgksqlYVghxKoDVpfQYhnGy53ndHrLEYrGvm5ubxyil9iqW79MjyQn1Lf3XrV+Td7INKRAyJUKWhGVKhC15zwvXR6/pi84KKiiFPlnMrLdhUGHbUxq5d3u0xiNVI1ZeV+7eCiroC/pETEtji3+KaM2b0p362uV3jv3z9ptWBf/f0SdikuDCpPdqMD2YVZ33v/vApK2KzCqooBz6RMzTjh300Zr1FMsIb9WdZw1f9X3PVVZQQQUVdMP/ATEJ6OtpFOH2AAAAAElFTkSuQmCC" alt="Yii Logo">
                </a>
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"><i class="fa fa-inverse fa-bars"></i></button>
            </div>
            <div class="navbar-collapse collapse navbar-right">
                <?php 
// main navigation
echo Nav::widget(['id' => 'main-nav', 'encodeLabels' => false, 'options' => ['class' => 'nav navbar-nav navbar-main-menu'], 'activateItems' => false, 'dropDownCaret' => '<span class="caret"></span>', 'items' => [['label' => 'Learn', 'items' => [['label' => '<i class="fa fa-angle-double-right"></i> Getting started', 'url' => ['site/tour']], ['label' => '<i class="fa fa-angle-double-right"></i> The Definitive Guide', 'url' => ['guide/entry']], ['label' => '<i class="fa fa-angle-double-right"></i> API Documentation', 'url' => ['api/index', 'version' => reset(Yii::$app->params['api.versions'])]], ['label' => '<i class="fa fa-angle-double-right"></i> Books', 'url' => ['site/books']], ['label' => '<i class="fa fa-angle-double-right"></i> Resources', 'url' => ['site/resources']]]], ['label' => 'Develop', 'items' => [['label' => '<i class="fa fa-angle-double-right"></i> Install Yii', 'url' => ['site/download']], ['label' => '<i class="fa fa-angle-double-right"></i> Report an Issue', 'url' => ['site/report-issue']], ['label' => '<i class="fa fa-angle-double-right"></i> Report a Security Issue', 'url' => ['site/security']], ['label' => '<i class="fa fa-angle-double-right"></i> Contribute to Yii', 'url' => ['/site/contribute']]]], ['label' => 'Discuss', 'items' => [['label' => '<i class="fa fa-angle-double-right"></i> Forum', 'url' => '/forum'], ['label' => '<i class="fa fa-angle-double-right"></i> Live Chat', 'url' => ['site/chat']]]], ['label' => 'About', 'items' => [['label' => '<i class="fa fa-angle-double-right"></i> What is Yii?', 'url' => ['site/about']], ['label' => '<i class="fa fa-angle-double-right"></i> News', 'url' => ['site/news']], ['label' => '<i class="fa fa-angle-double-right"></i> License', 'url' => ['site/license']], ['label' => '<i class="fa fa-angle-double-right"></i> Team', 'url' => ['site/team']], ['label' => '<i class="fa fa-angle-double-right"></i> Official logo', 'url' => ['site/logo']]]], ['label' => 'Login', 'url' => ['site/login'], 'visible' => Yii::$app->user->isGuest, 'options' => ['class' => 'hidden-lg']], ['label' => 'Signup', 'url' => ['site/signup'], 'visible' => Yii::$app->user->isGuest, 'options' => ['class' => 'hidden-lg']], ['label' => 'Logout', 'url' => ['site/logout'], 'visible' => !Yii::$app->user->isGuest, 'linkOptions' => ['data-method' => 'post'], 'options' => ['class' => 'hidden-lg']]]]);
?>
                <!-- Search dropdown - only visible on larger screens -->
                <ul class="nav navbar-nav visible-lg">
                    <li class="dropdown search-form-toggle">
                        <a href="#" class="dropdown-toggle" title="Search" data-toggle="dropdown"><i class="fa fa-search"></i></a>
                        <ul class="dropdown-menu navbar-search-form">
                          	<li>
                                <ul class="nav navbar-nav">
                                    <li>
                                        <?php 
echo $this->render('_searchForm');
?>
                                    </li>
                                </ul>
                            </li>
开发者ID:aiddroid,项目名称:yiiframework.com,代码行数:31,代码来源:main.php


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