Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Structures de données | |
interface | ImmutableNodeInterface |
interface | NodeInterface |
Fonctions | |
& | getChildren ($recursive=false) |
getParent () | |
getRoot () | |
hasChildren () | |
hasParent () | |
getSibling ($right=true) | |
setParent (NodeInterface $parent) | |
addChild (NodeInterface $child) | |
removeChild (NodeInterface $child) | |
setSibling (NodeInterface $sibling, $right=true) | |
Variables | |
trait | ImmutableNodeTrait |
$_children = array() | |
$_leftSibling = null | |
$_rightSibling = null | |
trait | NodeTrait |
Joomla! Content Management System
Joomla\CMS\Tree\addChild | ( | NodeInterface | $child | ) |
Add child to this node
If the child already has a parent, the link is unset
NodeInterface | $child | The child to be added. |
Références $this, et NodeInterface\setParent().
& Joomla\CMS\Tree\getChildren | ( | $recursive = false | ) |
Get the children of this node
boolean | $recursive | False by default |
Références Joomla\CMS\Tree\$_children, et $items.
Référencé par CategoryNode\getNumItems().
Joomla\CMS\Tree\getParent | ( | ) |
Get the parent of this node
Référencé par Joomla\CMS\Tree\getRoot(), et Joomla\CMS\Tree\hasParent().
Joomla\CMS\Tree\getRoot | ( | ) |
Get the root of the tree
Références $root, $this, et Joomla\CMS\Tree\getParent().
Joomla\CMS\Tree\getSibling | ( | $right = true | ) |
Returns the right or left sibling of a node
boolean | $right | If set to false, returns the left sibling |
Références Joomla\CMS\Tree\$_leftSibling, et Joomla\CMS\Tree\$_rightSibling.
Joomla\CMS\Tree\hasChildren | ( | ) |
Test if this node has children
Joomla\CMS\Tree\hasParent | ( | ) |
Test if this node has a parent
Références Joomla\CMS\Tree\getParent(), et null.
Joomla\CMS\Tree\removeChild | ( | NodeInterface | $child | ) |
Remove a specific child
NodeInterface | $child | Child to remove |
Références $key.
Joomla\CMS\Tree\setParent | ( | NodeInterface | $parent | ) |
Set the parent of this node
If the node already has a parent, the link is unset
NodeInterface | null | $parent | NodeInterface for the parent to be set or null |
Joomla\CMS\Tree\setSibling | ( | NodeInterface | $sibling, |
$right = true |
|||
) |
Function to set the left or right sibling of a node
NodeInterface | $sibling | NodeInterface object for the sibling |
boolean | $right | If set to false, the sibling is the left one |
|
protected |
Référencé par Joomla\CMS\Tree\getChildren(), CategoryNode\getChildren(), et CategoryModel\getChildren().
|
protected |
Référencé par Joomla\CMS\Tree\getSibling(), et CategoryNode\getSibling().
|
protected |
Référencé par Joomla\CMS\Tree\getSibling(), et CategoryNode\getSibling().
trait ImmutableNodeTrait |
trait NodeTrait |
Defines the trait for a Node Interface Trait Class.