class
Component extends Node
A Component type of node for MenuTree
Methods
__construct(
string $title,
string $element,
string $link,
string $target = null,
string $class = null,
string $id = null,
string $icon = null)
Constructor for the class.
integer
getLevel()
Find the current node depth in the tree hierarchy
boolean
isRoot()
Check whether the object instance node is the root node
void
setActive(
bool $active)
Set the active state on or off
void
setParams(
Registry $params)
set the params array
mixed
getParam(
string $key)
Get the param value from the node params
mixed
get(
string $name)
Get an attribute value
Details
__construct(
string $title,
string $element,
string $link,
string $target = null,
string $class = null,
string $id = null,
string $icon = null)
Constructor for the class.
Node
addChild(
Node $child)
Add child to this node
If the child already has a parent, the link is unset
void
removeChild(
Node $child)
Remove a child from this node
If the child exists it is unset
boolean
hasParent()
Test if this node has a parent
Node
getParent()
Get the parent of this node
boolean
hasChildren()
Test if this node has children
Node[]
getChildren()
Get the children of this node
integer
getLevel()
Find the current node depth in the tree hierarchy
boolean
isRoot()
Check whether the object instance node is the root node
void
setActive(
bool $active)
Set the active state on or off
void
setParams(
Registry $params)
mixed
getParam(
string $key)
Get the param value from the node params