tasoft / menu-service
v8.0.1
2024-07-09 10:00 UTC
Requires
- php: ^8
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-12-09 10:51:54 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!