tasoft/menu-service

v8.0.0 2023-02-07 15:24 UTC

This package is auto-updated.

Last update: 2024-05-07 18:03:23 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!