protected function createMissingChildNodes($workspaceName, $dryRun, NodeType $nodeType = null)
{
if ($nodeType !== null) {
$this->output->outputLine('Checking nodes of type "%s" for missing child nodes ...', array($nodeType->getName()));
$this->createChildNodesByNodeType($nodeType, $workspaceName, $dryRun);
} else {
$this->output->outputLine('Checking for missing child nodes ...');
foreach ($this->nodeTypeManager->getNodeTypes() as $nodeType) {
/** @var NodeType $nodeType */
if ($nodeType->isAbstract()) {
continue;
}
$this->createChildNodesByNodeType($nodeType, $workspaceName, $dryRun);
}
}
$this->persistenceManager->persistAll();
}