Neos.ContentRepository/Classes/Command/NodeCommandControllerPlugin.php
public function removeNodesWithInvalidDimensions($workspaceName)
    {
        $this->dispatch(self::EVENT_NOTICE, 'Checking for nodes with invalid dimensions ...');

        $allowedDimensionCombinations = $this->contentDimensionCombinator->getAllAllowedCombinations();
        $nodesArray = $this->collectNodesWithInvalidDimensions($workspaceName, $allowedDimensionCombinations);
        if ($nodesArray === []) {
            return;
        }
        $numberOfNodes = count($nodesArray);
        $taskDescription = sprintf('Remove <i>%d</i> node%s with invalid dimension values', $numberOfNodes, $numberOfNodes > 1 ? 's' : '');
        $taskClosure = function () use ($nodesArray) {
            foreach ($nodesArray as $nodeArray) {
                $this->removeNode($nodeArray['identifier'], $nodeArray['dimensionsHash']);
            }
        };
        $taskRequiresConfirmation = true;
        $this->dispatch(self::EVENT_TASK, $taskDescription, $taskClosure, $taskRequiresConfirmation);
    }
public function removeNodesWithInvalidDimensions($workspaceName)
    {
        $this->dispatch(self::EVENT_NOTICE, 'Checking for nodes with invalid dimensions ...');

        $allowedDimensionCombinations = $this->contentDimensionCombinator->getAllAllowedCombinations();
        $nodesArray = $this->collectNodesWithInvalidDimensions($workspaceName, $allowedDimensionCombinations);
        if ($nodesArray === []) {
            return;
        }
        $numberOfNodes = count($nodesArray);
        $taskDescription = sprintf('Remove <i>%d</i> node%s with invalid dimension values', $numberOfNodes, $numberOfNodes > 1 ? 's' : '');
        $taskClosure = function () use ($nodesArray) {
            foreach ($nodesArray as $nodeArray) {
                $this->removeNode($nodeArray['identifier'], $nodeArray['dimensionsHash']);
            }
        };
        $taskRequiresConfirmation = true;
        $this->dispatch(self::EVENT_TASK, $taskDescription, $taskClosure, $taskRequiresConfirmation);
    }
public function removeNodesWithInvalidDimensions ( $ workspaceName ) { $ this -> dispatch ( self :: EVENT_NOTICE , 'Checking for nodes with invalid dimensions ...' ) ; $ allowedDimensionCombinations = $ this -> contentDimensionCombinator -> getAllAllowedCombinations ( ) ; $ nodesArray = $ this -> collectNodesWithInvalidDimensions ( $ workspaceName , $ allowedDimensionCombinations ) ; if ( $ nodesArray === [ ] ) { return ; } $ numberOfNodes = count ( $ nodesArray ) ; $ taskDescription = sprintf ( 'Remove <i>%d</i> node%s with invalid dimension values' , $ numberOfNodes , $ numberOfNodes > 1 ? 's' : '' ) ; $ taskClosure = function ( ) use ( $ nodesArray ) { foreach ( $ nodesArray as $ nodeArray ) { $ this -> removeNode ( $ nodeArray [ 'identifier' ] , $ nodeArray [ 'dimensionsHash' ] ) ; } } ; $ taskRequiresConfirmation = true ; $ this -> dispatch ( self :: EVENT_TASK , $ taskDescription , $ taskClosure , $ taskRequiresConfirmation ) ; }
Remove nodes with invalid dimension values

This removes nodes which have dimension values not fitting to the current dimension configuration

@param string $workspaceName Name of the workspace to consider
@return void
Remove nodes with invalid dimension values