Skip to content

BootstrapMenu

Viames Marino edited this page Feb 23, 2026 · 1 revision

Pair framework: BootstrapMenu

Pair\Html\BootstrapMenu extends Menu with Bootstrap-oriented rendering helpers.

Main behavior

Protected rendering methods:

  • renderDropdown(MenuEntry $entry): string
  • renderSeparator(MenuEntry $entry): string
  • renderSingle(MenuEntry $entry): string

Implementation example

$menu = new \Pair\Html\BootstrapMenu();
$menu->add('Home', '/');
$menu->add('Products', '/products');

echo $menu->render();

Notes

  • Uses MenuEntry objects to represent nodes.
  • Designed for Bootstrap HTML class conventions.

See also: Menu, MenuEntry.

Clone this wiki locally