| Function |
Return type
|
Description
|
__construct($id:string, $title:string, $url:string)
|
|
Create a new menu link. $Id must be a unique value.
|
AddChild($child:SMMenuItem)
|
SMMenuItem |
See description for AddChild($child:SMMenuItem) on SMMenuManager. |
AddChild($child:SMMenuItem, SMMenuItemAppendMode)
|
SMMenuItem |
See description for AddChild($child:SMMenuItem, SMMenuItemAppendMode) on SMMenuManager.
|
| RemoveChild($id:string) |
Boolean |
See description for RemoveChild($id:string) on SMMenuManager |
| RemoveChild($id:string, $commit:boolean) |
Boolean |
See description for RemoveChild($id:string, $commit:boolean) on SMMenuManager |
| SetChildren($children:SMMenuItem[]) |
|
See description for SetChildren($children:SMMenuItem[]) on SMMenuManager |
| GetChildren() |
SMMenuItem[] |
See description for getChildren() on SMMenuManager |
| GetChild($id:string) |
SMMenuItem |
See description for GetChild($id:string) on SMMenuManager |
| GetParentId() |
String |
Returns the ID of the parent node. An empty string is returned, if node is a root node.
|
GetId
|
String |
Returns the ID of the child.
|
SetTitle($value:string)
|
|
Set the title of the child.
|
| GetTitle() |
String |
Get the title of the child.
|
| SetUrl($url:string) |
|
Set the URL of the child. |
| GetUrl() |
String |
Get the URL of the child. |
| SetOrder($order:string) |
|
Set the order of the child in proportion to its siblings. The child with the lowest order number will have the top most position in the navigation menu. |
| GetOrder() |
String |
Get the order (position) of the child. |
| DeletePersistent() |
Boolean |
Permanently removes the item from the data source. Notice that children are preserved in the data source. Returns True on success, otherwise False. |
| DeletePersistent($deleteChildren:boolean) |
Boolean |
See description for DeletePersistent(). All children and their children are removed along with the given node. |
| CommitPersistent() |
Boolean
|
Make menu item permanent by committing it to the data source. If item is supposed to be a child of another node, make sure to add it to that node before committing it - see description for AddChild($child:SMMenuItem). Returns True on success, otherwise False.
|
CommitPersistent($commitChildren:boolean)
|
Boolean
|
See description for CommitPersistent(). If $commitChildren is True all children of the given node, and their children, will be committed.
|
::GetPersistent($id:string)
|
SMMenuItem
|
Load the item with the given ID from the data source. Null is returned if not found.
|
| ::GetPersistent($id:string, $getChildren:boolean) |
SMMenuItem
|
See description for GetPersistent($id:string). All children, and their children, are included.
|