Neos.ContentRepository/Classes/Domain/Model/Node.php
protected function createNodeForVariant(NodeData $nodeData): NodeInterface
    {
        $contextProperties = $this->context->getProperties();
        $contextProperties['dimensions'] = $nodeData->getDimensionValues();
        unset($contextProperties['targetDimensions']);
        $adjustedContext = $this->contextFactory->create($contextProperties);

        return $this->nodeFactory->createFromNodeData($nodeData, $adjustedContext);
    }
protected function createNodeForVariant(NodeData $nodeData): NodeInterface
    {
        $contextProperties = $this->context->getProperties();
        $contextProperties['dimensions'] = $nodeData->getDimensionValues();
        unset($contextProperties['targetDimensions']);
        $adjustedContext = $this->contextFactory->create($contextProperties);

        return $this->nodeFactory->createFromNodeData($nodeData, $adjustedContext);
    }
protected function createNodeForVariant ( NodeData $ nodeData ) : NodeInterface { $ contextProperties = $ this -> context -> getProperties ( ) ; $ contextProperties [ 'dimensions' ] = $ nodeData -> getDimensionValues ( ) ; unset ( $ contextProperties [ 'targetDimensions' ] ) ; $ adjustedContext = $ this -> contextFactory -> create ( $ contextProperties ) ; return $ this -> nodeFactory -> createFromNodeData ( $ nodeData , $ adjustedContext ) ; }
Create a node for the given NodeData, given that it is a variant of the current node

@param NodeData $nodeData
@return NodeInterface
@throws NodeConfigurationException
Create a node for the given NodeData given that it is a variant of the current node