Neos\ContentRepository\Domain\Model\Workspace::moveNodeVariantToTargetWorkspace PHP 메소드

moveNodeVariantToTargetWorkspace() 보호된 메소드

If no target node variant (having the same dimension values) exists in the target workspace, the node that is published will be used as a new node variant in the target workspace.
protected moveNodeVariantToTargetWorkspace ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface The node to publish
$targetWorkspace Workspace The workspace to publish to
리턴 void
    protected function moveNodeVariantToTargetWorkspace(NodeInterface $node, Workspace $targetWorkspace)
    {
        $nodeData = $node->getNodeData();
        $this->handleShadowNodeData($nodeData, $targetWorkspace, $nodeData);
        // Technically this shouldn't be needed but due to doctrines behavior we need it.
        if ($nodeData->isRemoved() && $targetWorkspace->getBaseWorkspace() === null) {
            $this->nodeDataRepository->remove($nodeData);
            return;
        }
        $nodeData->setMovedTo(null);
        $nodeData->setWorkspace($targetWorkspace);
        $nodeData->setLastPublicationDateTime($this->now);
        $node->setNodeDataIsMatchingContext(null);
        $this->nodeService->cleanUpProperties($node);
    }