Back to Joomla project (class list)

Class ImmutableNodeInterface - list of methods

Interface for an immutable node class
Package: Joomla\CMS\Tree
Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Tree/ImmutableNodeInterface.php
Project: Joomla

Method Summary

public \Joomla\CMS\Tree\NodeInterface[]
(mixed $recursive = false)

Get the children of this node
Parameters
  • bool $recursive False by default
Returns
  • \Joomla\CMS\Tree\NodeInterface[] The children
Since
  • 4.0.0
Show source code of this method: getChildren Source Code

public \Joomla\CMS\Tree\NodeInterface|null
()

Get the parent of this node
Returns
  • \Joomla\CMS\Tree\NodeInterface|null
Since
  • 4.0.0
Show source code of this method: getParent Source Code

public \Joomla\CMS\Tree\ImmutableNodeInterface
()

Get the root of the tree
Returns
  • \Joomla\CMS\Tree\ImmutableNodeInterface
Since
  • 4.0.0
Show source code of this method: getRoot Source Code

public bool
()

Test if this node has children
Returns
  • bool True if there is a child
Since
  • 4.0.0
Show source code of this method: hasChildren Source Code

public bool
()

Test if this node has a parent
Returns
  • bool True if there is a parent
Since
  • 4.0.0
Show source code of this method: hasParent Source Code

public \Joomla\CMS\Tree\NodeInterface|null
(mixed $right = true)

Returns the right or left sibling of a node
Parameters
  • bool $right If set to false, returns the left sibling
Returns
  • \Joomla\CMS\Tree\NodeInterface|null NodeInterface object of the sibling.
Since
  • 4.0.0
Show source code of this method: getSibling Source Code

Tags Summary

Since
4.0.0