Tree
Menu Tree class to represent a menu tree hierarchy
since |
3.8.0 |
---|---|
deprecated |
4.0 Use Joomla\CMS\Menu\MenuItem |
Methods
__construct
Constructor
__construct()
since |
3.8.0 |
---|---|
deprecated |
4.0 Use Joomla\CMS\Menu\MenuItem |
addChild
Method to add a child
addChild(\Joomla\CMS\Menu\Node $node, boolean $setCurrent = false) : \Joomla\CMS\Menu\Node
since |
3.8.0 |
---|---|
deprecated |
4.0 Use Joomla\CMS\Menu\MenuItem |
Arguments
- $node
\Joomla\CMS\Menu\Node
The node to process- $setCurrent
boolean
Set this new child as the current node for further working
Response
\Joomla\CMS\Menu\Node
The newly added node
getCss
Get the CSS declarations for this tree
getCss() : array<mixed,string>
since |
3.8.0 |
---|---|
deprecated |
4.0 |
Response
array<mixed,string>
getCurrent
Get the current node
getCurrent() : \Joomla\CMS\Menu\Node
getIconClass
Method to get the CSS class name for an icon identifier or create one if a custom image path is passed as the identifier
getIconClass() : string
since |
3.8.0 |
---|---|
deprecated |
4.0 |
Response
string
CSS class name
getParent
Method to get the parent and set it as active optionally
getParent(boolean $setCurrent = true) : \Joomla\CMS\Menu\Node
since |
3.8.0 |
---|---|
deprecated |
4.0 Use Joomla\CMS\Menu\MenuItem |
Arguments
- $setCurrent
boolean
Set that parent as the current node for further working
Response
getRoot
Get the root node
getRoot() : \Joomla\CMS\Menu\Node
reset
Method to reset the working pointer to the root node and optionally clear all menu nodes
reset(boolean $clear = false) : \Joomla\CMS\Menu\Node
since |
3.8.0 |
---|---|
deprecated |
4.0 Use Joomla\CMS\Menu\MenuItem |
Arguments
- $clear
boolean
Whether to clear the existing menu items or just reset the pointer to root element
Response
\Joomla\CMS\Menu\Node
The root node
setCurrent
Get the current node
setCurrent(\Joomla\CMS\Menu\Node $node) : void
since |
3.8.0 |
---|---|
deprecated |
4.0 Use Joomla\CMS\Menu\MenuItem |
Arguments
- $node
\Joomla\CMS\Menu\Node
The node to be set as current
Properties
css
The CSS style array
since |
3.8.0 |
---|
Type(s)
array<mixed,string>