定制 anekdotes/menus 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

anekdotes/menus

Composer 安装命令:

composer require anekdotes/menus

包简介

Utility to generate a static array full of links

README 文档

README

Latest Stable Version Build Status codecov.io StyleCI License Total Downloads Codacy Badge

Utility to generate an intelligent "range" of links based on the current page and total pages.

Installation

Install via composer in your project :

composer require anekdotes/menus

Basic usage

Load the class

  use Anekdotes\Menus\Menus;

Add menu using the class' method

  Menus::addItem('test 1', '/test1', 'fa-potato');

You can also specify the level and position

  Menus::addItem('test 1', '/test1', 'fa-potato', 1, 1);

You can also add a namespace

  Menus::addItem('test 1', '/test1', 'fa-potato', 1, 1, 'potato');

Fetch all main menus

  $items = Menus::main();

Or get all menus from a desired level and namespace

  $items = Menus::get('potato', 1);

Advanced

addItem

Method to add an item to the menu's array

  Menus::addItem($title, $url, $icon, $level, $position, $namespace);
  //$title the link title/name/text
  //$url the link url
  //$icon the link icon (font-awesome, ex: fa-times)
  //$level the link level (default: 1)
  //$position the link position (default: 0)
  //$namespace the link namespace (default: "")

removeItem

Method to remove an item from the menu's array

  Menus::removeItem($level, $position);
  //$level link level
  //$position the link position

find

Method to find a specific item from the menu's array

  Menus::find($level, $position);
  //$level link level
  //$position the link position

main

Method to get all level 1 item

  Menus::main($sort);
  //$sort sorting either SORT_ASC or SORT_DESC (default: SORT_ASC)

clear

Method to clear all items from menu's array

  Menus::clear();

get

Method to get all item from desired level and namespace

  Menus::get($namespace, $level);
  //$namespace the link namespace (default: "")
  //$level the link level (default: 1)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固