quanzo/yii2-menu
Composer 安装命令:
composer require quanzo/yii2-menu
包简介
Organize many menus for site. Module for Yii2
关键字:
README 文档
README
The module is designed to organize several menus on the site.
Supported restriction on the display of each menu item
-
by route
-
by access rights
You can show guests one thing and administrators another.
-----------------------------------------
Модуль предназначен для организации нескольких меню на сайт.
Поддерживается ограничение на показ каждого пункта меню
-
по route
-
по правам доступа
Можно показать гостям одно, а администраторам другое.
-----------------------------------------
Install
Use composer
composer require "quanzo/yii2-menu"
or add in section require in composer.json
"quanzo/yii2-menu": "*"
Install db migration.
Configure
$config = [
'modules' => [
'menu' => [
'class' => 'x51\yii2\modules\menu\Module',
'as access' => [
'class' => \yii\filters\AccessControl::className(),
'rules' => [
[
'allow' => true,
'roles' => ['menu_manage'],
],
[
'allow' => false,
'roles' => ['?'],
],
],
],
],
],
];
How use
<div class="menu"><?=Menu::widget([
'items' => \x51\yii2\modules\menu\helpers\MenuHelper::getMenu('menu-name'),
'options' => [],
'activeCssClass' => 'current',
]);?></div>
Picture
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-09-02

