All Projects → KnpLabs → Knpmenu

KnpLabs / Knpmenu

Licence: mit
Menu Library for PHP

Labels

Projects that are alternatives of or similar to Knpmenu

Duo Navigation Drawer
A flexible, easy to use, unique drawer library for your Android project.
Stars: ✭ 986 (-17.63%)
Mutual labels:  menu
Kpdropmenu
KPDropMenu is an Objective-C port of HADropDown With Additional features
Stars: ✭ 50 (-95.82%)
Mutual labels:  menu
Popmenu
A fully customizable popup style menu for iOS 😎
Stars: ✭ 1,155 (-3.51%)
Mutual labels:  menu
Jquery Menuflip
Create animated flipping menu links with this extremely lightweight jQuery plugin.
Stars: ✭ 39 (-96.74%)
Mutual labels:  menu
Expandablemenu
Expandable Menu button
Stars: ✭ 47 (-96.07%)
Mutual labels:  menu
Tippyjs React
React component for Tippy.js (official)
Stars: ✭ 1,081 (-9.69%)
Mutual labels:  menu
Fepopupmenucontroller
A simple, elegant pop-up menu view
Stars: ✭ 32 (-97.33%)
Mutual labels:  menu
Eeh Navigation
An AngularJS menu module.
Stars: ✭ 74 (-93.82%)
Mutual labels:  menu
Debuguisystem
Create a runtime menu system with buttons and windows for debugging in one line of code.
Stars: ✭ 48 (-95.99%)
Mutual labels:  menu
Pmenu
A pie-menu in xlib and imlib2.
Stars: ✭ 66 (-94.49%)
Mutual labels:  menu
Material Bottom Nav
A bottom navigation bar adhering to the Material Design specification.
Stars: ✭ 41 (-96.57%)
Mutual labels:  menu
Circlemenu
CircleMenu is a simple, elegant menu with a circular layout.
Stars: ✭ 1,018 (-14.95%)
Mutual labels:  menu
Ember Select Box
🔠 A faux select box for Ember apps
Stars: ✭ 60 (-94.99%)
Mutual labels:  menu
Ftpopovermenu
FTPopOverMenu is a pop over menu for iOS which is maybe the easiest one to use. Supports both portrait and landscape. It can show from any UIView, any UIBarButtonItem and any CGRect.
Stars: ✭ 988 (-17.46%)
Mutual labels:  menu
Electron Tray Window
🖼️ Generates custom tray windows with Electron.js
Stars: ✭ 71 (-94.07%)
Mutual labels:  menu
Electron Create Menu
a default menu for your electron applications, with convenience functions for multiplatform use and i18n.
Stars: ✭ 35 (-97.08%)
Mutual labels:  menu
Gem
Good Enough Menu for Arduino
Stars: ✭ 54 (-95.49%)
Mutual labels:  menu
Tippyjs
Tooltip, popover, dropdown, and menu library
Stars: ✭ 9,433 (+688.05%)
Mutual labels:  menu
Fwpopupviewoc
信手拈来的OC弹窗库:1、继承 FWPopupBaseView 即可轻松实现各种位置、动画类型的弹窗;2、新功能引导弹窗。更多弹窗场景等你来挑战,总之,想怎么弹就怎么弹!!!
Stars: ✭ 70 (-94.15%)
Mutual labels:  menu
Ngsplitmenucontroller
Menu Driven Split view controller
Stars: ✭ 61 (-94.9%)
Mutual labels:  menu

KnpMenu

The KnpMenu library provides object oriented menus for PHP. It is used by the KnpMenuBundle for Symfony but can now be used stand-alone.

Build Status Latest Stable Version Latest Unstable Version Gitter chat

Installation

KnpMenu uses Composer, please checkout the composer website for more information.

The simple following command will install knp-menu into your project. It also add a new entry in your composer.json and update the composer.lock as well.

$ composer require knplabs/knp-menu

KnpMenu follows the PSR-4 convention names for its classes, which means you can easily integrate knp-menu classes loading in your own autoloader.

Getting Started

<?php

// Include dependencies installed with composer
require 'vendor/autoload.php';

use Knp\Menu\MenuFactory;
use Knp\Menu\Renderer\ListRenderer;

$factory = new MenuFactory();
$menu = $factory->createItem('My menu');
$menu->addChild('Home', ['uri' => '/']);
$menu->addChild('Comments', ['uri' => '#comments']);
$menu->addChild('Symfony', ['uri' => 'http://symfony.com/']);
$menu->addChild('Happy Awesome Developers');

$renderer = new ListRenderer(new \Knp\Menu\Matcher\Matcher());
echo $renderer->render($menu);

The above menu would render the following HTML:

<ul>
  <li class="first">
    <a href="/">Home</a>
  </li>
  <li class="current">
    <a href="#comments">Comments</a>
  </li>
  <li>
    <a href="http://symfony.com/">Symfony</a>
  </li>
  <li class="last">
    <span>Happy Awesome Developers</span>
  </li>
</ul>

This way you can finally avoid writing an ugly template to show the selected item, the first and last items, submenus, ...

The bulk of the documentation can be found in the doc directory.

What now?

Follow the tutorial in doc/01-Basic-Menus.md and doc/02-Twig-Integration.md to discover how KnpMenu will rock your world!

Find all available documentation at doc/.

Maintainers

This library is maintained by the following people (alphabetically sorted) :

Credits

This bundle was originally ported from ioMenuPlugin, a menu plugin for symfony1. It has since been developed by KnpLabs and the Symfony community.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].