Class: MenuProxy

MenuProxy()

This class is the model for the menu system and contains the current state of the for it. It hold the root for the menu hierarchy.

Constructor

Source:

Methods

init(root)

Initialize the menu hierarchy. Eg:

Parameters:
Name Type Description
root Menu

The root of the menu hierarchy

Source:
Example
let child = root.push(new Menu(1, '/some/url'));
let grandChild = child.push(new Menu(5, '/some/url'));
grandchild.push(new Menu(15, '/some/url'));

select(url)

Select an menu item and ensure it is visible

Parameters:
Name Type Description
url string

A given url

Source:

setParameter(url)

Set a parameter on menu items by parameter names. Parameters can come from the query part or from the uri path. If the last segment is a number it will match parameters of uid and if more than 2 segments it will also match second last segment with ${segment}_uid It is only the first parameter from the query part which is used.

Parameters:
Name Type Description
url string

A given url

Source: