Neos.Neos/Classes/Controller/CreateContentContextTrait.php
protected function createContentContext($workspaceName, array $dimensions = [])
    {
        $contextProperties = [
            'workspaceName' => $workspaceName,
            'invisibleContentShown' => true,
            'inaccessibleContentShown' => true
        ];

        if ($dimensions !== []) {
            $contextProperties['dimensions'] = $dimensions;
            $contextProperties['targetDimensions'] = array_map(function ($dimensionValues) {
                return array_shift($dimensionValues);
            }, $dimensions);
        }

        return $this->_contextFactory->create($contextProperties);
    }
protected function createContentContext($workspaceName, array $dimensions = [])
    {
        $contextProperties = [
            'workspaceName' => $workspaceName,
            'invisibleContentShown' => true,
            'inaccessibleContentShown' => true
        ];

        if ($dimensions !== []) {
            $contextProperties['dimensions'] = $dimensions;
            $contextProperties['targetDimensions'] = array_map(function ($dimensionValues) {
                return array_shift($dimensionValues);
            }, $dimensions);
        }

        return $this->_contextFactory->create($contextProperties);
    }
protected function createContentContext ( $ workspaceName , array $ dimensions = [ ] ) { $ contextProperties = [ 'workspaceName' => $ workspaceName , 'invisibleContentShown' => true , 'inaccessibleContentShown' => true ] ; if ( $ dimensions !== [ ] ) { $ contextProperties [ 'dimensions' ] = $ dimensions ; $ contextProperties [ 'targetDimensions' ] = array_map ( function ( $ dimensionValues ) { return array_shift ( $ dimensionValues ) ; } , $ dimensions ) ; } return $ this -> _contextFactory -> create ( $ contextProperties ) ; }
Create a ContentContext based on the given workspace name

@param string $workspaceName Name of the workspace to set for the context
@param array $dimensions Optional list of dimensions and their values which should be set
@return ContentContext
Create a ContentContext based on the given workspace name