Constructor
new Menu(uid, url, parameterName)
Parameters:
Name | Type | Description |
---|---|---|
uid |
int | A uniq id |
url |
string | A url for this menu |
parameterName |
string | The name of parameter. |
- Source:
Members
selected
Tells whether this menu is selected or not.
- Source:
url
Gets the calculated url for this menu.
- Source:
visible
Tells whether this menu is visible or not.
- Source:
Methods
ensureVisible()
Ensure that the menu and it's intermediate children are visible.
- Source:
getByUid(uid) → {Menu|null}
Find a menu with by uid
Parameters:
Name | Type | Description |
---|---|---|
uid |
int | The search uid |
- Source:
Returns:
If found it returns the menu otherwise null
- Type
- Menu | null
hasMatch(url) → {boolean}
Find a menu in this menu or its children which matches a given url
Parameters:
Name | Type | Description |
---|---|---|
url |
string |
- Source:
Returns:
True when found otherwise false
- Type
- boolean
push(data) → {Menu}
Add a child menu to this menu
Parameters:
Name | Type | Description |
---|---|---|
data |
Menu | The child menu to be added |
- Source:
Returns:
The given child menu
- Type
- Menu
reset()
Resets this menu and all it's to a known state which not visible and not selected
- Source:
select(url)
Find a menu in this menu or its children which matches a given url
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The given url |
- Source:
setParameter(args)
Set the value of the parameter name for this menu and its children.
Parameters:
Name | Type | Description |
---|---|---|
args |
collect | A set of parameter values. |
- Source: