markhatchell/cakephp3-easy-menus 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

markhatchell/cakephp3-easy-menus

Composer 安装命令:

composer require markhatchell/cakephp3-easy-menus

包简介

An easy to use table based menu plugin for CakePHP3

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

Notice

This plugin is still in a development phase.

If you wish to contribute please let me know.

The plugin should now work pretty well.

The requirements are not included in composer as you should include them directly with composer or a CDN.

Features

  • Store your menu in a database table so that your load-balanced servers can all access and display the same menu without having to update the source.
  • Nested menu structure.
  • Based on Bootstrap nav.
  • Manual or Route based link types.
  • Collects all the routes and offers them for you to use them as a menu item.
  • Class parameters for the menu to aid with styling.
  • Configurable menu display options.

Upcoming Features

  • √ Class parameters for the menu to aid with styling.
  • Showing and hiding menu items based on if the user is authenticated.
  • Regeneration of static link field in the db based on the route info stored in the params field.
  • Role based access, this will require the users of this plugin to have a role field on their user entities.
  • Caching for the menus.

Requirements

  • bootstrap - used for form layout and menu display.
  • jQuery - used for form layout and menu display.

###With composer:

composer require elboletaire/twbs-cake-plugin:~3.0
composer require twbs/bootstrap:~3.0

composer require components/jquery:1.*
#[OR]
composer require components/jquery:2.* #jQuery 2.x (IE <9 not supported)

###With CDN:

$this->Html->css('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css');
$this->Html->css('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css');
$this->Html->script('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js');

$this->Html->script('http://code.jquery.com/jquery-1.11.3.min.js');
//[OR]
$this->Html->script('http://code.jquery.com/jquery-2.1.4.min.js'); //jQuery 2.x (IE <9 not supported)

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require 'markhatchell/cakephp3-easy-menus:dev-master'

Usage

Add this to config/bootstrap.php to activate the plugin:

Plugin::load('EasyMenus', ['bootstrap' => false, 'routes' => true]);

Install the table for EasyMenus:

bin/cake migrations migrate --plugin EasyMenus

To display the menu: Add this to /src/Controller/AppController.php

use EasyMenus\Controller\Component\EasyMenusComComponent;
...
    public function initialize()
    {
        parent::initialize();
        ...
        $this->loadComponent('EasyMenus.EasyMenusCom');
    }

Add this to src/template/layout/default.ctp:

<?=$this->Element('EasyMenus.easymenu')?>

To access the menu admin UI navigate to:

/admin/EasyMenus

统计信息

  • 总下载量: 85
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固