widgets\Menu run()

run() public method Renders the menu. public void run ( )

widgets\Menu renderItems()

renderItems() protected method Recursively renders the menu items (without the container tag). protected string renderItems ( $items )$items array The menu items to be rendered recursively return string The rendering result

widgets\Menu renderItem()

renderItem() protected method Renders the content of a menu item. Note that the container and the sub-menus are not rendered here. protected string renderItem ( $item )$item array The menu item to be rendered. Please refer to $items to see what data might be in the item. return string The rendering result

widgets\Menu normalizeItems()

normalizeItems() protected method Normalizes the $items property to remove invisible items and activate certain items. protected array normalizeItems ( $items, &$active )$items array The items to be normalized. $active boolean Whether there is an active child menu item. return array The normalized menu items

widgets\Menu isItemActive()

isItemActive() protected method Checks whether a menu item is active. This is done by checking if $route and $params match that specified in the url option of the menu item. When the url option of a menu item is specified in terms of an array, its first element is treated as the route for the item and the rest of the elements are the associated parameters. Only when its route and parameters match $route and $params, respectively, will a menu item be considered active. protected boolean is

widgets\Menu $submenuTemplate

$submenuTemplate public property The template used to render a list of sub-menus. In this template, the token {items} will be replaced with the rendered sub-menu items. public string $submenuTemplate = "\n<ul>\n{items}\n</ul>\n"

widgets\Menu $route

$route public property The route used to determine if a menu item is active or not. If not set, it will use the route of the current request. See also: $params isItemActive() public string $route = null

widgets\Menu $params

$params public property The parameters used to determine if a menu item is active or not. If not set, it will use $_GET. See also: $route isItemActive() public array $params = null

widgets\Menu $options

$options public property The HTML attributes for the menu's container tag. The following special options are recognized: tag: string, defaults to "ul", the tag name of the item container tags. Set to false to disable container tag. See also yii\helpers\Html::tag(). See also yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. public array $options = []

widgets\Menu $linkTemplate

$linkTemplate public property The template used to render the body of a menu which is a link. In this template, the token {url} will be replaced with the corresponding link URL; while {label} will be replaced with the link text. This property will be overridden by the template option set in individual menu items via $items. public string $linkTemplate = '<a href="{url}">{label}</a>'