Neos.ContentRepository/Classes/Domain/Model/Workspace.php
protected function moveNodeVariantsInOtherWorkspaces($nodeIdentifier, $targetPath, Workspace $sourceWorkspace, Workspace $targetWorkspace)
    {
        $nodeDataVariants = $this->nodeDataRepository->findByNodeIdentifier($nodeIdentifier);
        /** @var NodeData $nodeDataVariant */
        foreach ($nodeDataVariants as $nodeDataVariant) {
            if (
                $nodeDataVariant->getWorkspace()->getBaseWorkspace() === null ||
                $nodeDataVariant->getPath() === $targetPath ||
                $nodeDataVariant->getWorkspace() === $sourceWorkspace ||
                $nodeDataVariant->getWorkspace() === $targetWorkspace
            ) {
                continue;
            }

            $shadowNodeData = $this->nodeDataRepository->findOneByMovedTo($nodeDataVariant);
            if ($shadowNodeData === null) {
                $nodeDataVariant->setPath($targetPath);
            }
        }
    }
protected function moveNodeVariantsInOtherWorkspaces($nodeIdentifier, $targetPath, Workspace $sourceWorkspace, Workspace $targetWorkspace)
    {
        $nodeDataVariants = $this->nodeDataRepository->findByNodeIdentifier($nodeIdentifier);
        /** @var NodeData $nodeDataVariant */
        foreach ($nodeDataVariants as $nodeDataVariant) {
            if (
                $nodeDataVariant->getWorkspace()->getBaseWorkspace() === null ||
                $nodeDataVariant->getPath() === $targetPath ||
                $nodeDataVariant->getWorkspace() === $sourceWorkspace ||
                $nodeDataVariant->getWorkspace() === $targetWorkspace
            ) {
                continue;
            }

            $shadowNodeData = $this->nodeDataRepository->findOneByMovedTo($nodeDataVariant);
            if ($shadowNodeData === null) {
                $nodeDataVariant->setPath($targetPath);
            }
        }
    }
protected function moveNodeVariantsInOtherWorkspaces ( $ nodeIdentifier , $ targetPath , Workspace $ sourceWorkspace , Workspace $ targetWorkspace ) { $ nodeDataVariants = $ this -> nodeDataRepository -> findByNodeIdentifier ( $ nodeIdentifier ) ; /** @var NodeData $nodeDataVariant */ foreach ( $ nodeDataVariants as $ nodeDataVariant ) { if ( $ nodeDataVariant -> getWorkspace ( ) -> getBaseWorkspace ( ) === null || $ nodeDataVariant -> getPath ( ) === $ targetPath || $ nodeDataVariant -> getWorkspace ( ) === $ sourceWorkspace || $ nodeDataVariant -> getWorkspace ( ) === $ targetWorkspace ) { continue ; } $ shadowNodeData = $ this -> nodeDataRepository -> findOneByMovedTo ( $ nodeDataVariant ) ; if ( $ shadowNodeData === null ) { $ nodeDataVariant -> setPath ( $ targetPath ) ; } } }
Moves variants of a given node which exists in other workspaces than source and target workspace.

@param string $nodeIdentifier The node which is about to be moved
@param string $targetPath The target node path the node is being moved to
@param Workspace $sourceWorkspace The workspace the node is currently located
@param Workspace $targetWorkspace The workspace the node is being published to
Moves variants of a given node which exists in other workspaces than source and target workspace .