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();
}