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

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

Performs checks for missing child nodes according to the node's auto-create configuration and creates them if necessary.
protected createMissingChildNodes ( 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 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();
    }