ImmutableNodeInterface

Interface for an immutable node class

since

4.0.0

package

Joomla CMS

Methods

getChildren

Get the children of this node

getChildren( recursive = false) : \Joomla\CMS\Tree\NodeInterface||string|int
since

4.0.0

Arguments

recursive

boolFalse by default

Response

array<string|int, NodeInterface>The children

getParent

Get the parent of this node

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

4.0.0

Response

NodeInterface|null

getRoot

Get the root of the tree

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

4.0.0

Response

ImmutableNodeInterface

getSibling

Returns the right or left sibling of a node

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

4.0.0

Arguments

right

boolIf set to false, returns the left sibling

Response

NodeInterface|nullNodeInterface object of the sibling.

hasChildren

Test if this node has children

hasChildren() : 
since

4.0.0

Response

boolTrue if there is a child

hasParent

Test if this node has a parent

hasParent() : 
since

4.0.0

Response

boolTrue if there is a parent