mouf / html.widgets.menu
This package contains objects describing a menu of an application. The menu is described, but this package does not render the menu in any way. You will have to use another package to render the menu in HTML. Usually, templates will provide their own menu renderers.
Installs: 237 081
Dependents: 3
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 5
Open Issues: 0
Type:mouf-library
Requires
- php: >=7.1
- mouf/html.renderer: ^2
- mouf/utils.common.conditioninterface: 2.*
- thecodingmachine/funky: ^1
Requires (Dev)
- mouf/utils.i18n.fine.translation-interface: ^4
- phpstan/phpstan: ^0.10.3
- squizlabs/php_codesniffer: ^3.3.1
- thecodingmachine/phpstan-strict-rules: ^0.10.3
README
This package contains base objects and interfaces to describe menus and menu items. Basically, using interfaces and objects of this package, you can describe a menu.
Menus are rendered using Mouf's rendering system.
Using the rendering system, other packages, or templates, or your project can override the HTML of the menu.
In practice
A menu is defined using the Menu
class.
The Menu
class can contain many MenuItem
. Each menu item can contain many children MenuItem
.
Mouf package
This package is part of Mouf (http://mouf-php.com), an effort to ensure good developing practices by providing a graphical dependency injection framework. Using Mouf's user interface, you can create your menu graphically, by creating instances of Menu and MenuItem.