本文整理汇总了PHP中webvimark\modules\UserManagement\UserManagementModule::menuItems方法的典型用法代码示例。如果您正苦于以下问题:PHP UserManagementModule::menuItems方法的具体用法?PHP UserManagementModule::menuItems怎么用?PHP UserManagementModule::menuItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webvimark\modules\UserManagement\UserManagementModule
的用法示例。
在下文中一共展示了UserManagementModule::menuItems方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
<title><?php
echo Html::encode($this->title);
?>
</title>
<?php
$this->head();
?>
</head>
<body>
<?php
$this->beginBody();
?>
<div class="wrap">
<?php
NavBar::begin(['brandLabel' => 'TisBOX', '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' => 'О Системе', 'url' => ['/site/about']], ['label' => 'Обратная связь', 'url' => ['/site/contact']], ['label' => 'Форум', 'url' => ['/forum']], Yii::$app->user->isGuest ? ['label' => 'Вход', 'url' => ['/user-management/auth/login']] : GhostNav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'encodeLabels' => false, 'activateParents' => true, 'items' => [['label' => 'Администратор', 'items' => UserManagementModule::menuItems()], ['label' => Yii::$app->user->identity->username, 'items' => [['label' => 'Регистрация', 'url' => ['/user-management/auth/registration']], ['label' => 'Изменить пароль', 'url' => ['/user-management/auth/change-own-password']], ['label' => 'Востановить пароль', 'url' => ['/user-management/auth/password-recovery']], ['label' => 'Подтвердить E-mail', 'url' => ['/user-management/auth/confirm-email']], ['label' => 'Выход', 'url' => ['/user-management/auth/logout']]]]]])]]);
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">
示例2:
<?php
use webvimark\modules\UserManagement\UserManagementModule;
use webvimark\ybc\content\ContentModule;
//You can user float numbers as array keys for menu elements
//Like '27.5'=> ['some element']
return ['0' => ['label' => '<i class="fa fa-dashboard"></i> Dashboard', 'url' => ['/dashboard/index']], '10' => ['label' => '<i class="fa fa-book"></i> ' . Yii::t('app', 'Content') . ' <i class="fa pull-right fa-angle-left"></i>', 'options' => ['class' => 'treeview'], 'url' => '#', 'items' => ContentModule::getSideMenuItems()], '20' => ['label' => '<i class="fa fa-users"></i> ' . Yii::t('app', "Users") . ' <i class="fa pull-right fa-angle-left"></i>', 'options' => ['class' => 'treeview'], 'url' => '#', 'items' => UserManagementModule::menuItems()], '30' => ['label' => '<i class="fa fa-cogs"></i> ' . Yii::t('app', "Settings") . ' <i class="fa pull-right fa-angle-left"></i>', 'options' => ['class' => 'treeview'], 'url' => '#', 'items' => ['31' => ['label' => '<i class="fa fa-pagelines"></i> ' . Yii::t('app', 'General'), 'url' => ['/settings/manage/index']], '32' => ['label' => '<i class="fa fa-line-chart"></i> SEO', 'url' => ['/settings/manage/seo']]]], '40' => ['label' => '<i class="fa fa-code"></i> Modules <i class="fa pull-right fa-angle-left"></i>', 'options' => ['class' => 'treeview'], 'url' => '#', 'items' => []], '999999' => ['label' => '<i class="fa fa-wrench"></i> ' . Yii::t('app', 'Dev junk') . ' <i class="fa pull-right fa-angle-left"></i>', 'options' => ['class' => 'treeview'], 'url' => '#', 'items' => [['label' => '<i class="fa fa-random"></i> Migrations', 'url' => ['/migrations/default/index']], ['label' => '<i class="fa fa-gears"></i> Gii', 'url' => ['/gii/default/index'], 'visible' => YII_ENV_DEV && Yii::$app->user->isSuperadmin]]]];
示例3: isset
$this->head();
?>
<link rel="shortcut icon" href="<?php
echo Yii::$app->request->baseUrl;
?>
/favicon.ico" type="image/x-icon" />
</head>
<body>
<?php
$this->beginBody();
?>
<div class="wrap">
<?php
NavBar::begin(['brandLabel' => 'Car-Labs', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
echo GhostNav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'encodeLabels' => false, 'items' => [['label' => 'Recipe Editor', 'url' => ['/recipe/tree-edit']], ['label' => 'About', 'url' => ['/site/about']], Yii::$app->user->isGuest ? ['label' => 'Login', 'url' => ['/user-management/auth/login']] : ['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/user-management/auth/logout']], ['label' => 'Admin', 'items' => array_merge(UserManagementModule::menuItems(), [['label' => 'Change Password', 'url' => ['/user-management/auth/change-own-password']]])]]]);
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">
示例4: 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 Company'), 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
echo Nav::widget(['encodeLabels' => false, 'activateParents' => true, 'options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => Yii::t('app', 'Home'), 'url' => ['/site/index']], ['label' => Yii::t('app', 'Status'), 'url' => ['/status/create']], ['label' => Yii::t('app', 'Contact'), 'url' => ['/site/contact']], ['label' => 'Backend routes', 'items' => UserManagementModule::menuItems()], ['label' => 'Frontend routes', 'items' => [Yii::$app->user->isGuest ? ['label' => Yii::t('app', 'Login'), 'url' => ['/user-management/auth/login']] : ['label' => Yii::t('app', 'Logout'), ' . Yii::$app->user->identity->username . ', 'url' => ['/user-management/auth/logout']], ['label' => Yii::t('app', 'Registration'), 'url' => ['/user-management/user/create']], ['label' => Yii::t('app', 'Change on password'), 'url' => ['/user-management/auth/change-own-password']], ['label' => Yii::t('app', 'Password recovery'), 'url' => ['/user-management/auth/password-recovery']], ['label' => Yii::t('app', 'E-mail confirmation'), 'url' => ['/user-management/auth/confirm-email']]]]]]);
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">
示例5:
<?php
use webvimark\modules\UserManagement\components\GhostMenu;
use webvimark\modules\UserManagement\UserManagementModule;
echo GhostMenu::widget(['encodeLabels' => false, 'activateParents' => true, 'items' => [['label' => 'Backend routes', 'items' => UserManagementModule::menuItems()], ['label' => 'Frontend routes', 'items' => [['label' => 'Login', 'url' => ['/user-management/auth/login']], ['label' => 'Logout', 'url' => ['/user-management/auth/logout']], ['label' => 'Registration', 'url' => ['/user-management/auth/registration']], ['label' => 'Change own password', 'url' => ['/user-management/auth/change-own-password']], ['label' => 'Password recovery', 'url' => ['/user-management/auth/password-recovery']], ['label' => 'E-mail confirmation', 'url' => ['/user-management/auth/confirm-email']]]]]]);