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

addMissingDefaultValues() публичный Метод

Performs checks for unset properties that has default values and sets them if necessary.
public addMissingDefaultValues ( 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
    public function addMissingDefaultValues($workspaceName, $dryRun, NodeType $nodeType = null)
    {
        if ($nodeType !== null) {
            $this->output->outputLine('Checking nodes of type "%s" for missing default values ...', array($nodeType->getName()));
            $this->addMissingDefaultValuesByNodeType($nodeType, $workspaceName, $dryRun);
        } else {
            $this->output->outputLine('Checking for missing default values ...');
            foreach ($this->nodeTypeManager->getNodeTypes() as $nodeType) {
                /** @var NodeType $nodeType */
                if ($nodeType->isAbstract()) {
                    continue;
                }
                $this->addMissingDefaultValuesByNodeType($nodeType, $workspaceName, $dryRun);
            }
        }
    }