tasoft/menu-service

v0.9.6 2020-08-27 21:06 UTC

This package is auto-updated.

Last update: 2021-09-27 23:40:16 UTC


README

The menu library is an approach to create abstract models of menus or navigation bars.
It is no HTML render, just a model that stores, validates and selects menus and menu items.

$ composer require tasoft/menu-service

It allows to create menus (as containers) and menu items (as items) and maintains consistency.

use TASoft\MenuService\Menu;
use TASoft\MenuService\MenuItem;

$menu = new Menu("menu");

$item = new MenuItem("item");
$menu->addItem($item);

// $item->getMenu() === $menu  => TRUE!