Back to ImmutableNodeInterface class

Method getSibling

public \Joomla\CMS\Tree\NodeInterface|null
getSibling
(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

Method getSibling - Source code

/**
 * Returns the right or left sibling of a node
 *
 * @param   boolean  $right  If set to false, returns the left sibling
 *
 * @return  NodeInterface|null  NodeInterface object of the sibling.
 *
 * @since   4.0.0
 */
public function getSibling($right = true);