NodeTrait
Defines the trait for a Node Interface Trait Class.
since |
4.0.0 |
---|---|
package |
Joomla CMS |
Methods
addChild
Add child to this node
addChild(\Joomla\CMS\Tree\NodeInterface child) : void
If the child already has a parent, the link is unset
since |
4.0.0 |
---|
Arguments
- child
\Joomla\CMS\Tree\NodeInterface
The child to be added.
removeChild
Remove a specific child
removeChild(\Joomla\CMS\Tree\NodeInterface child) : void
since |
4.0.0 |
---|
Arguments
- child
\Joomla\CMS\Tree\NodeInterface
Child to remove
setParent
Set the parent of this node
setParent(\Joomla\CMS\Tree\NodeInterface|null parent) : void
If the node already has a parent, the link is unset
since |
4.0.0 |
---|
Arguments
- parent
\Joomla\CMS\Tree\NodeInterface|null
NodeInterface for the parent to be set or null
setSibling
Function to set the left or right sibling of a node
setSibling(\Joomla\CMS\Tree\NodeInterface sibling, bool right = true) : void
since |
4.0.0 |
---|
Arguments
- sibling
\Joomla\CMS\Tree\NodeInterface
NodeInterface object for the sibling- right
bool
If set to false, the sibling is the left one