Neos\Neos\Controller\Module\Management\WorkspacesController::getOriginalNode PHP Method

getOriginalNode() protected method

Retrieves the given node's corresponding node in the base workspace (that is, which would be overwritten if the given node would be published)
protected getOriginalNode ( Neos\ContentRepository\Domain\Model\NodeInterface $modifiedNode ) : Neos\ContentRepository\Domain\Model\NodeInterface
$modifiedNode Neos\ContentRepository\Domain\Model\NodeInterface
return Neos\ContentRepository\Domain\Model\NodeInterface
    protected function getOriginalNode(NodeInterface $modifiedNode)
    {
        $baseWorkspaceName = $modifiedNode->getWorkspace()->getBaseWorkspace()->getName();
        $contextProperties = $modifiedNode->getContext()->getProperties();
        $contextProperties['workspaceName'] = $baseWorkspaceName;
        $contentContext = $this->contextFactory->create($contextProperties);
        return $contentContext->getNodeByIdentifier($modifiedNode->getIdentifier());
    }