Back to NodeInterface class

Method setSibling

public void
setSibling
(\Joomla\CMS\Tree\NodeInterface $sibling, mixed $right = true)
Function to set the left or right sibling of a node
Parameters
  • \Joomla\CMS\Tree\NodeInterface $sibling NodeInterface object for the sibling
  • bool $right If set to false, the sibling is the left one
Returns
  • void
Since
  • 4.0.0
Class: NodeInterface
Project: Joomla

Method setSibling - Source code

/**
 * Function to set the left or right sibling of a node
 *
 * @param   NodeInterface  $sibling  NodeInterface object for the sibling
 * @param   boolean        $right    If set to false, the sibling is the left one
 *
 * @return  void
 *
 * @since   4.0.0
 */
public function setSibling(NodeInterface $sibling, $right = true);