Neos\ContentRepository\Command\NodeCommandControllerPlugin::reorderChildNodes PHP Метод

reorderChildNodes() защищенный Метод

Reorder child nodes according to the current position configuration of child nodes.
protected reorderChildNodes ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void
$workspaceName string Name of the workspace to consider
$dryRun boolean Simulate?
$nodeType Neos\ContentRepository\Domain\Model\NodeType Only for this node type, if specified
Результат void
    protected function reorderChildNodes($workspaceName, $dryRun, NodeType $nodeType = null)
    {
        if ($nodeType !== null) {
            $this->output->outputLine('Checking nodes of type "%s" for child nodes that need reordering ...', array($nodeType->getName()));
            $this->reorderChildNodesByNodeType($workspaceName, $dryRun, $nodeType);
        } else {
            $this->output->outputLine('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();
    }