Method |
Description |
|
__construct ( string $name, string $text, string $href ) |
\ElggMenuItem constructor |
|
addChild ( ElggMenuItem $item ) : void |
Add a child menu item |
|
addDeps ( string[] | string $modules ) : void |
Add required AMD modules |
|
addItemClass ( mixed $class ) : void |
Add a li class |
|
addLinkClass ( mixed $class ) : void |
Add a link class |
|
factory ( array $options ) : ElggMenuItem |
Create an ElggMenuItem from an associative array. Required keys are name, text, and href. |
|
getChildren ( ) : ElggMenuItem[] |
Get the children menu items |
|
getConfirmText ( ) : string |
Get the confirm text |
|
getContext ( ) : array |
Get an array of context strings |
|
getData ( string $key ) : mixed |
Get stored data |
|
getDeps ( ) : string[] |
Get required AMD modules |
|
getHref ( ) : string |
Get the URL of the menu item |
|
getItemClass ( ) : string |
Get the li classes as text |
|
getLinkClass ( ) : string |
Get the anchor classes as text |
|
getName ( ) : string |
Get the identifier of the menu item |
|
getParent ( ) : ElggMenuItem |
Get the parent menu item |
|
getParentName ( ) : string |
Get the parent identifier |
|
getPriority ( ) : integer |
Get the priority of the menu item |
|
getSection ( ) : string |
Get the section identifier |
|
getSelected ( ) : boolean |
Get selected state |
|
getText ( ) : string |
Get the display text of the menu item |
|
getTooltip ( ) : string |
Get the tool tip text |
|
getValues ( ) : array |
Get all the values for this menu item. Useful for rendering. |
|
inContext ( string $context = '' ) : boolean |
Should this menu item be used given the current context |
|
setChildren ( ElggMenuItem[] $children ) : void |
Set the menu item's children |
|
setConfirmText ( string $text ) : void |
Set the confirm text shown when link is clicked |
|
setContext ( array $contexts ) : void |
Set the contexts that this menu item is available for |
|
setData ( mixed $key, mixed $value = null ) : void |
Set a data key/value pair or a set of key/value pairs |
|
setDeps ( string[] | string $modules ) : void |
Set required AMD modules |
|
setHref ( string $href ) : void |
Set the URL of the menu item |
|
setItemClass ( mixed $class ) : void |
Set the li classes |
|
setLinkClass ( mixed $class ) : void |
Set the anchor class |
|
setName ( string $name ) : void |
Set the identifier of the menu item |
|
setParent ( ElggMenuItem $parent ) : void |
Set the parent menu item |
|
setParentName ( string $name ) : void |
Set the parent identifier |
|
setPriority ( integer $priority ) : void |
Set the priority of the menu item |
|
setSection ( string $section ) : void |
Set the section identifier |
|
setSelected ( boolean $state = true ) : void |
Set the selected flag |
|
setText ( string $text ) : void |
Set the display text of the menu item |
|
setTooltip ( string $text ) : void |
Set the tool tip text |
|
sortChildren ( string $sortFunction ) : void |
Sort the children |
|