‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Tree\TreeNodeCollection Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Tree\TreeNodeCollection:
TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection

Public Member Functions

 __construct (array $data=[])
 
 asort ()
 
int nodeCompare (TreeNode $node, TreeNode $otherNode)
 
string serialize ()
 
 unserialize ($serializedString)
 
array toArray ()
 
 dataFromArray ($data)
 

Detailed Description

Tree Node Collection

Definition at line 24 of file TreeNodeCollection.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Tree\TreeNodeCollection::__construct ( array  $data = [])

Constructor

You can move an initial data array to initialize the instance and further objects. This is useful for the deserialization.

Parameters
array$data

Definition at line 34 of file TreeNodeCollection.php.

References TYPO3\CMS\Backend\Tree\TreeNodeCollection\dataFromArray().

Member Function Documentation

◆ asort()

TYPO3\CMS\Backend\Tree\TreeNodeCollection::asort ( )

Sorts the internal nodes array

Definition at line 45 of file TreeNodeCollection.php.

Referenced by TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection\append().

◆ dataFromArray()

TYPO3\CMS\Backend\Tree\TreeNodeCollection::dataFromArray (   $data)

Sets the data of the node collection by a given array

Parameters
array$data

Definition at line 112 of file TreeNodeCollection.php.

Referenced by TYPO3\CMS\Backend\Tree\TreeNodeCollection\__construct(), and TYPO3\CMS\Backend\Tree\TreeNodeCollection\unserialize().

◆ nodeCompare()

int TYPO3\CMS\Backend\Tree\TreeNodeCollection::nodeCompare ( TreeNode  $node,
TreeNode  $otherNode 
)

Compares a node with another one

See also
‪\TYPO3\CMS\Backend\Tree\TreeNode::compareTo
Parameters
TreeNode$node
TreeNode$otherNode
Returns
‪int

Definition at line 59 of file TreeNodeCollection.php.

References TYPO3\CMS\Backend\Tree\TreeNode\compareTo().

◆ serialize()

string TYPO3\CMS\Backend\Tree\TreeNodeCollection::serialize ( )

Returns the serialized instance

Returns
‪string

Definition at line 69 of file TreeNodeCollection.php.

References TYPO3\CMS\Backend\Tree\TreeNodeCollection\toArray().

◆ toArray()

array TYPO3\CMS\Backend\Tree\TreeNodeCollection::toArray ( )

Returns the collection in an array representation for e.g. serialization

Returns
‪array

Definition at line 94 of file TreeNodeCollection.php.

Referenced by TYPO3\CMS\Backend\Tree\TreeNodeCollection\serialize().

◆ unserialize()

TYPO3\CMS\Backend\Tree\TreeNodeCollection::unserialize (   $serializedString)

Initializes the current object with a serialized instance

Parameters
string$serializedString
Exceptions

Definition at line 80 of file TreeNodeCollection.php.

References TYPO3\CMS\Backend\Tree\TreeNodeCollection\dataFromArray().