ppiixx/cake-menu
最新稳定版本:1.0.0
Composer 安装命令:
composer require ppiixx/cake-menu
包简介
An nice menu component for CakePHP v3.0
README 文档
README
Introduction
Our first plugin developed to assist in the creation of menus, using our other plugin
Installation
First follow the installation: Install
Require the package:
composer require ppiixx/menu
Run the following commands:
bin/cake plugin load -r menu
bin/cake migrations migrate -p menu
bin/cake seed_cake_menu
And place in your AppController.php
// AppController.php
$this->loadComponent('menu.Menu');
// Sample of use
$this->set('menu', $this->Menu->userMenu($this->Auth->user('id')));
Adding other plugins controllers
// AppController.php
public function initialize()
{
parent::initialize();
$this->loadComponent('Flash');
$this->loadComponent('.Authorizer');
$this->loadComponent('menu.Menu');
$this->loadComponent('Auth', [
'authorize' => ['.Cake'],
'loginAction' => [
'controller' => 'Users',
'action' => 'login',
'plugin' => ''
],
'loginRedirect' => [
'controller' => 'Users',
'action' => 'index',
'plugin' => ''
]
]);
// SAMPLE!!!!
$this->Menu->addControllersFolder('menu\\Controller\\', 'vendor/ppiixx/menu/src/Controller/');
$this->Menu->addControllersFolder('\\Controller\\', 'vendor/ppiixx/authorizer/src/Controller/');
}
Modules
You can access the modules panel at:
统计信息
- 总下载量: 118
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-16