TYPO3  7.6
Public Member Functions | List of all members
ComparableNodeInterface Interface Reference
Inheritance diagram for ComparableNodeInterface:
TreeNode ExtDirectNode TreeRepresentationNode PagetreeNode DatabaseTreeNode

Public Member Functions

 compareTo ($other)
 

Detailed Description

Interface that defines the comparison of nodes

Definition at line 20 of file ComparableNodeInterface.php.

Member Function Documentation

compareTo (   $other)

Compare Node against another one

Returns: 1 if the current node is greater than the $other, -1 if $other is greater than the current node and 0 if the nodes are equal

Example

if ($this->sortValue > $other->sortValue) {
return 1;
} elseif ($this->sortValue < $other->sortValue) {
return -1;
} else {
return 0;
}
Parameters
\TYPO3\CMS\Backend\Tree\TreeNode$other
Returns
int see description

Implemented in TreeNode, and DatabaseTreeNode.