Neos\ContentRepository\Command\NodeCommandControllerPlugin::repairShadowNodes PHP Method

repairShadowNodes() protected method

This check searches for nodes which have a corresponding node in one of the base workspaces, have different node paths, but don't have a corresponding shadow node with a "movedto" value.
protected repairShadowNodes ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void
$workspaceName string Currently ignored
$dryRun boolean Simulate?
$nodeType Neos\ContentRepository\Domain\Model\NodeType This argument will be ignored
return void
    protected function repairShadowNodes($workspaceName, $dryRun, NodeType $nodeType = null)
    {
        /** @var Workspace $workspace */
        $workspace = $this->workspaceRepository->findByIdentifier($workspaceName);
        if ($workspace->getBaseWorkspace() === null) {
            $this->output->outputLine('Repairing base workspace "%s", therefore skipping check for shadow nodes.', [$workspaceName]);
            $this->output->outputLine();
            return;
        }
        $this->output->outputLine('Checking for nodes with missing shadow nodes ...');
        $fixedShadowNodes = $this->fixShadowNodesInWorkspace($workspace, $nodeType);
        $this->output->outputLine('%s %s node%s with missing shadow nodes.', [$dryRun ? 'Would repair' : 'Repaired', $fixedShadowNodes, $fixedShadowNodes !== 1 ? 's' : '']);
        $this->output->outputLine();
    }