Neos.ContentRepository/Classes/Domain/Factory/NodeFactory.php
public function createContextMatchingNodeData(NodeData $nodeData)
    {
        return $this->contextFactory->create([
            'workspaceName' => $nodeData->getWorkspace()->getName(),
            'invisibleContentShown' => true,
            'inaccessibleContentShown' => true,
            'removedContentShown' => true,
            'dimensions' => $nodeData->getDimensionValues()
        ]);
    }
public function createContextMatchingNodeData(NodeData $nodeData)
    {
        return $this->contextFactory->create([
            'workspaceName' => $nodeData->getWorkspace()->getName(),
            'invisibleContentShown' => true,
            'inaccessibleContentShown' => true,
            'removedContentShown' => true,
            'dimensions' => $nodeData->getDimensionValues()
        ]);
    }
public function createContextMatchingNodeData ( NodeData $ nodeData ) { return $ this -> contextFactory -> create ( [ 'workspaceName' => $ nodeData -> getWorkspace ( ) -> getName ( ) , 'invisibleContentShown' => true , 'inaccessibleContentShown' => true , 'removedContentShown' => true , 'dimensions' => $ nodeData -> getDimensionValues ( ) ] ) ; }
Generates a Context that exactly fits the given NodeData Workspace and Dimensions.

TODO: We could get more specific about removed and invisible content by adding some more logic here that generates fitting values.

@param NodeData $nodeData
@return Context
Generates a Context that exactly fits the given NodeData Workspace and Dimensions .