TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Tree\TreeNodeCollection Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Tree\TreeNodeCollection:
TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection

Public Member Functions

 __construct (array $data=[])
 
 asort ()
 
 nodeCompare (\TYPO3\CMS\Backend\Tree\TreeNode $node, \TYPO3\CMS\Backend\Tree\TreeNode $otherNode)
 
 serialize ()
 
 unserialize ($serializedString)
 
 toArray ()
 
 dataFromArray ($data)
 

Detailed Description

Tree Node Collection

Definition at line 20 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 30 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

Returns
void

Definition at line 42 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
Returns
void

Definition at line 109 of file TreeNodeCollection.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

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

◆ nodeCompare()

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

Compares a node with another one

See also
::compareTo
Returns
void

Definition at line 54 of file TreeNodeCollection.php.

◆ serialize()

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

Returns the serialized instance

Returns
string

Definition at line 64 of file TreeNodeCollection.php.

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

◆ toArray()

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

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

Returns
array

Definition at line 90 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
Returns
void
Exceptions

Definition at line 76 of file TreeNodeCollection.php.

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