Neos.ContentRepository/Classes/Command/NodeCommandControllerPlugin.php
protected function reorderChildNodes($workspaceName, $dryRun, NodeType $nodeType = null)
    {
        if ($nodeType !== null) {
            $this->dispatch(self::EVENT_NOTICE, sprintf('Checking nodes of type "<i>%s</i>" for child nodes that need reordering ...', $nodeType));
            $this->reorderChildNodesByNodeType($workspaceName, $dryRun, $nodeType);
        } else {
            $this->dispatch(self::EVENT_NOTICE, 'Checking for child nodes that need reordering ...');
            foreach ($this->nodeTypeManager->getNodeTypes() as $nodeType) {
                /** @var NodeType $nodeType */
                if ($nodeType->isAbstract()) {
                    continue;
                }
                $this->reorderChildNodesByNodeType($workspaceName, $dryRun, $nodeType);
            }
        }

        $this->persistenceManager->persistAll();
    }
protected function reorderChildNodes($workspaceName, $dryRun, NodeType $nodeType = null)
    {
        if ($nodeType !== null) {
            $this->dispatch(self::EVENT_NOTICE, sprintf('Checking nodes of type "<i>%s</i>" for child nodes that need reordering ...', $nodeType));
            $this->reorderChildNodesByNodeType($workspaceName, $dryRun, $nodeType);
        } else {
            $this->dispatch(self::EVENT_NOTICE, 'Checking for child nodes that need reordering ...');
            foreach ($this->nodeTypeManager->getNodeTypes() as $nodeType) {
                /** @var NodeType $nodeType */
                if ($nodeType->isAbstract()) {
                    continue;
                }
                $this->reorderChildNodesByNodeType($workspaceName, $dryRun, $nodeType);
            }
        }

        $this->persistenceManager->persistAll();
    }
protected function reorderChildNodes ( $ workspaceName , $ dryRun , NodeType $ nodeType = null ) { if ( $ nodeType !== null ) { $ this -> dispatch ( self :: EVENT_NOTICE , sprintf ( 'Checking nodes of type "<i>%s</i>" for child nodes that need reordering ...' , $ nodeType ) ) ; $ this -> reorderChildNodesByNodeType ( $ workspaceName , $ dryRun , $ nodeType ) ; } else { $ this -> dispatch ( self :: EVENT_NOTICE , 'Checking for child nodes that need reordering ...' ) ; foreach ( $ this -> nodeTypeManager -> getNodeTypes ( ) as $ nodeType ) { /** @var NodeType $nodeType */ if ( $ nodeType -> isAbstract ( ) ) { continue ; } $ this -> reorderChildNodesByNodeType ( $ workspaceName , $ dryRun , $ nodeType ) ; } } $ this -> persistenceManager -> persistAll ( ) ; }
Reorder child nodes according to the current position configuration of child nodes.

@param string $workspaceName Name of the workspace to consider
@param boolean $dryRun Simulate?
@param NodeType $nodeType Only for this node type, if specified
@return void
@throws NodeConfigurationException
@throws NodeTypeNotFoundException
Reorder child nodes according to the current position configuration of child nodes .