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) :
If the child already has a parent, the link is unset
| since |
4.0.0 |
|---|
Arguments
- child
NodeInterfaceThe child to be added.
Response
void
removeChild
Remove a specific child
removeChild(\Joomla\CMS\Tree\NodeInterface child) :
setParent
Set the parent of this node
setParent(\Joomla\CMS\Tree\NodeInterface parent) :
If the node already has a parent, the link is unset
| since |
4.0.0 |
|---|
Arguments
- parent
NodeInterfaceNodeInterface for the parent to be set
Response
void
setSibling
Function to set the left or right sibling of a node
setSibling(\Joomla\CMS\Tree\NodeInterface sibling, right = true) :
| since |
4.0.0 |
|---|
Arguments
- sibling
NodeInterfaceNodeInterface object for the sibling- right
boolIf set to false, the sibling is the left one
Response
void