TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Backend\Tree\ComparableNodeInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Backend\Tree\ComparableNodeInterface:
t3lib_tree_ComparableNode TYPO3\CMS\Backend\Tree\TreeNode t3lib_tree_Node TYPO3\CMS\Backend\Tree\ExtDirectNode TYPO3\CMS\Backend\Tree\TreeRepresentationNode t3lib_tree_extdirect_Node TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode t3lib_tree_RepresentationNode TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode t3lib_tree_pagetree_Node t3lib_tree_Tca_DatabaseNode

Public Member Functions

 compareTo ($other)
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Interface that defines the comparison of nodes

Author
Stefan Galinski stefa.nosp@m.n.ga.nosp@m.linsk.nosp@m.i@gm.nosp@m.ail.c.nosp@m.om

Definition at line 21 of file ComparableNodeInterface.php.

Member Function Documentation

◆ compareTo()

TYPO3\CMS\Backend\Tree\ComparableNodeInterface::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
integer see description

Implemented in TYPO3\CMS\Backend\Tree\TreeNode, and TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode.