ImmutableNodeInterface

Interface for an immutable node class

since

4.0.0

Methods

getChildren

Get the children of this node

getChildren(boolean $recursive = false) : array<mixed,\Joomla\CMS\Tree\NodeInterface>
since

4.0.0

Arguments

$recursive

booleanFalse by default

Response

array<mixed,\Joomla\CMS\Tree\NodeInterface>The children

getParent

Get the parent of this node

getParent() : \Joomla\CMS\Tree\NodeInterface|null
since

4.0.0

Response

\Joomla\CMS\Tree\NodeInterface|null

getRoot

Get the root of the tree

getRoot() : \Joomla\CMS\Tree\ImmutableNodeInterface

getSibling

Returns the right or left sibling of a node

getSibling(boolean $right = true) : \Joomla\CMS\Tree\NodeInterface|null
since

4.0.0

Arguments

$right

booleanIf set to false, returns the left sibling

Response

\Joomla\CMS\Tree\NodeInterface|nullNodeInterface object of the sibling.

hasChildren

Test if this node has children

hasChildren() : boolean
since

4.0.0

Response

booleanTrue if there is a child

hasParent

Test if this node has a parent

hasParent() : boolean
since

4.0.0

Response

booleanTrue if there is a parent