Neos.ContentRepository/Classes/Domain/Repository/NodeDataRepository.php
protected function sortNodesByIndex(array $nodes)
    {
        usort($nodes, function (NodeData $node1, NodeData $node2) {
            if ($node1->getIndex() < $node2->getIndex()) {
                return -1;
            } elseif ($node1->getIndex() > $node2->getIndex()) {
                return 1;
            } else {
                return strcmp($node1->getIdentifier(), $node2->getIdentifier());
            }
        });

        return $nodes;
    }
protected function sortNodesByIndex(array $nodes)
    {
        usort($nodes, function (NodeData $node1, NodeData $node2) {
            if ($node1->getIndex() < $node2->getIndex()) {
                return -1;
            } elseif ($node1->getIndex() > $node2->getIndex()) {
                return 1;
            } else {
                return strcmp($node1->getIdentifier(), $node2->getIdentifier());
            }
        });

        return $nodes;
    }
protected function sortNodesByIndex ( array $ nodes ) { usort ( $ nodes , function ( NodeData $ node1 , NodeData $ node2 ) { if ( $ node1 -> getIndex ( ) < $ node2 -> getIndex ( ) ) { return - 1 ; } elseif ( $ node1 -> getIndex ( ) > $ node2 -> getIndex ( ) ) { return 1 ; } else { return strcmp ( $ node1 -> getIdentifier ( ) , $ node2 -> getIdentifier ( ) ) ; } } ) ; return $ nodes ; }
Sorts the given nodes by their index

@param array $nodes Nodes
@return array Nodes sorted by index
Sorts the given nodes by their index