-
Notifications
You must be signed in to change notification settings - Fork 2
MenuEntry
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Html\MenuEntry is the final value object used by Menu renderers.
Use it indirectly through Menu/BootstrapMenu. In most applications you do not instantiate it manually.
- Represents one node (label, URL, state, nesting metadata).
- Serves as stable render input for menu classes.
$menu = new \Pair\Html\Menu();
$menu->add('Dashboard', '/dashboard');
$menu->add('Orders', '/orders');
$entries = $menu->getEntries();
// each item is a MenuEntry$menu = new \Pair\Html\BootstrapMenu();
$menu->add('Home', '/');
$menu->add('Products', '/products');
echo $menu->render();- Treating
MenuEntryas mutable business data instead of presentation data.
See also: Menu, BootstrapMenu, Breadcrumb.