Back to Joomla project (class list)

Class NodeTrait - list of methods

Defines the trait for a Node Interface Trait 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/NodeTrait.php
Project: Joomla

Method Summary

public void
(\Joomla\CMS\Tree\NodeInterface $parent)

Set the parent of this node
Parameters
  • \Joomla\CMS\Tree\NodeInterface|null $parent NodeInterface for the parent to be set or null
Returns
  • void
Since
  • 4.0.0
Show source code of this method: setParent Source Code

public void
(\Joomla\CMS\Tree\NodeInterface $child)

Add child to this node
Parameters
  • \Joomla\CMS\Tree\NodeInterface $child The child to be added.
Returns
  • void
Since
  • 4.0.0
Show source code of this method: addChild Source Code

public void
(\Joomla\CMS\Tree\NodeInterface $child)

Remove a specific child
Parameters
  • \Joomla\CMS\Tree\NodeInterface $child Child to remove
Returns
  • void
Since
  • 4.0.0
Show source code of this method: removeChild Source Code

public void
(\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
Show source code of this method: setSibling Source Code

Tags Summary

Since
4.0.0