TYPO3
7.6
|
Public Member Functions | |
__construct (array $data=array()) | |
setChildNodes (\TYPO3\CMS\Backend\Tree\TreeNodeCollection $childNodes) | |
removeChildNodes () | |
getChildNodes () | |
hasChildNodes () | |
setId ($id) | |
getId () | |
setParentNode (\TYPO3\CMS\Backend\Tree\TreeNode $parentNode=null) | |
getParentNode () | |
equals (\TYPO3\CMS\Backend\Tree\TreeNode $other) | |
compareTo ($other) | |
toArray ($addChildNodes=true) | |
dataFromArray ($data) | |
serialize () | |
unserialize ($serializedString) | |
Protected Attributes | |
$id = '' | |
$parentNode = null | |
$childNodes = null | |
Tree Node
Definition at line 22 of file TreeNode.php.
__construct | ( | array | $data = array() | ) |
Constructor
You can move an initial data array to initialize the instance and further objects. This is useful for the deserialization.
array | $data |
Definition at line 53 of file TreeNode.php.
References TreeNode\dataFromArray().
compareTo | ( | $other | ) |
Compares a node to another one.
Returns: 1 if its greater than the other one -1 if its smaller than the other one 0 if its equal
\TYPO3\CMS\Backend\Tree\TreeNode | $other |
Implements ComparableNodeInterface.
Definition at line 171 of file TreeNode.php.
References TreeNode\equals().
dataFromArray | ( | $data | ) |
Sets data of the node by a given data array
array | $data |
Definition at line 210 of file TreeNode.php.
References GeneralUtility\makeInstance(), TreeNode\setChildNodes(), TreeNode\setId(), and TreeNode\setParentNode().
Referenced by TreeNode\__construct(), and TreeNode\unserialize().
equals | ( | \TYPO3\CMS\Backend\Tree\TreeNode | $other | ) |
Compares a node if it's identical to another node by the id property.
\TYPO3\CMS\Backend\Tree\TreeNode | $other |
Definition at line 155 of file TreeNode.php.
Referenced by PagetreeNode\canBeCopied(), PagetreeNode\canBeCut(), PagetreeNode\canBePastedAfter(), PagetreeNode\canBePastedInto(), PagetreeNode\canBeRemoved(), DatabaseTreeNode\compareTo(), TreeNode\compareTo(), and PagetreeNode\isDeleted().
getChildNodes | ( | ) |
Returns child nodes collection
Definition at line 89 of file TreeNode.php.
References TreeNode\$childNodes.
getId | ( | ) |
Returns the identifier
Definition at line 123 of file TreeNode.php.
References TreeNode\$id.
Referenced by PagetreeNode\calculateNodeId(), PagetreeNode\toArray(), and ExtDirectNode\toArray().
getParentNode | ( | ) |
Returns the parent node
Definition at line 144 of file TreeNode.php.
References TreeNode\$parentNode.
hasChildNodes | ( | ) |
Returns TRUE if the node has child nodes attached
Definition at line 99 of file TreeNode.php.
Referenced by TreeNode\toArray(), and ExtDirectNode\toArray().
removeChildNodes | ( | ) |
serialize | ( | ) |
Returns the serialized instance
Definition at line 226 of file TreeNode.php.
References TreeNode\toArray().
setChildNodes | ( | \TYPO3\CMS\Backend\Tree\TreeNodeCollection | $childNodes | ) |
Sets the child nodes collection
\TYPO3\CMS\Backend\Tree\TreeNodeCollection | $childNodes |
Definition at line 66 of file TreeNode.php.
References TreeNode\$childNodes.
Referenced by TreeNode\dataFromArray().
setId | ( | $id | ) |
Sets the identifier
string | $id |
Definition at line 113 of file TreeNode.php.
References TreeNode\$id.
Referenced by TreeNode\dataFromArray().
setParentNode | ( | \TYPO3\CMS\Backend\Tree\TreeNode | $parentNode = null | ) |
Sets the parent node
NULL | \TYPO3\CMS\Backend\Tree\TreeNode | $parentNode |
Definition at line 134 of file TreeNode.php.
References TreeNode\$parentNode.
Referenced by TreeNode\dataFromArray().
toArray | ( | $addChildNodes = true | ) |
Returns the node in an array representation that can be used for serialization
bool | $addChildNodes |
Definition at line 185 of file TreeNode.php.
References TreeNode\hasChildNodes().
Referenced by TreeNode\serialize().
unserialize | ( | $serializedString | ) |
Fills the current node with the given serialized informations
\TYPO3\CMS\Core\Exception | if the deserialized object type is not identical to the current one |
string | $serializedString |
Definition at line 238 of file TreeNode.php.
References TreeNode\dataFromArray().
|
protected |
Definition at line 43 of file TreeNode.php.
Referenced by TreeNode\getChildNodes(), and TreeNode\setChildNodes().
|
protected |
Definition at line 29 of file TreeNode.php.
Referenced by TreeNode\getId(), and TreeNode\setId().
|
protected |
Definition at line 36 of file TreeNode.php.
Referenced by TreeNode\getParentNode(), and TreeNode\setParentNode().