Menu
in package
This class is responsible for rendering the standard menu of Kotchasan.
Tags
Table of Contents
- render() : string
- Renders the menu.
- getItem() : string
- Converts an item to a menu item and returns the HTML.
Methods
render()
Renders the menu.
public
static render(array<string|int, mixed> $items, string $select) : string
Parameters
- $items : array<string|int, mixed>
-
The menu items.
- $select : string
-
The selected menu item.
Return values
string —The rendered menu HTML.
getItem()
Converts an item to a menu item and returns the HTML.
protected
static getItem(string|int $name, array<string|int, mixed> $item, bool $arrow, string $select) : string
Parameters
- $name : string|int
-
The menu name.
- $item : array<string|int, mixed>
-
The menu item data array.
- $arrow : bool
-
True to show arrow for menus with submenus.
- $select : string
-
The selected menu name.
Return values
string —The HTML of the menu item.