Neos.ContentRepository/Classes/Domain/Service/PublishingService.php
protected function createContext(Workspace $workspace, array $dimensionValues, array $contextProperties = [])
    {
        $presetsMatchingDimensionValues = $this->contentDimensionPresetSource->findPresetsByTargetValues($dimensionValues);
        $dimensions = array_map(function ($preset) {
            return $preset['values'];
        }, $presetsMatchingDimensionValues);

        $contextProperties += [
            'workspaceName' => $workspace->getName(),
            'inaccessibleContentShown' => true,
            'invisibleContentShown' => true,
            'removedContentShown' => true,
            'dimensions' => $dimensions
        ];

        return $this->contextFactory->create($contextProperties);
    }
protected function createContext(Workspace $workspace, array $dimensionValues, array $contextProperties = [])
    {
        $presetsMatchingDimensionValues = $this->contentDimensionPresetSource->findPresetsByTargetValues($dimensionValues);
        $dimensions = array_map(function ($preset) {
            return $preset['values'];
        }, $presetsMatchingDimensionValues);

        $contextProperties += [
            'workspaceName' => $workspace->getName(),
            'inaccessibleContentShown' => true,
            'invisibleContentShown' => true,
            'removedContentShown' => true,
            'dimensions' => $dimensions
        ];

        return $this->contextFactory->create($contextProperties);
    }
protected function createContext ( Workspace $ workspace , array $ dimensionValues , array $ contextProperties = [ ] ) { $ presetsMatchingDimensionValues = $ this -> contentDimensionPresetSource -> findPresetsByTargetValues ( $ dimensionValues ) ; $ dimensions = array_map ( function ( $ preset ) { return $ preset [ 'values' ] ; } , $ presetsMatchingDimensionValues ) ; $ contextProperties += [ 'workspaceName' => $ workspace -> getName ( ) , 'inaccessibleContentShown' => true , 'invisibleContentShown' => true , 'removedContentShown' => true , 'dimensions' => $ dimensions ] ; return $ this -> contextFactory -> create ( $ contextProperties ) ; }
Creates a new content context based on the given workspace and the NodeData object.

@param Workspace $workspace Workspace for the new context
@param array $dimensionValues The dimension values for the new context
@param array $contextProperties Additional pre-defined context properties
@return Context
Creates a new content context based on the given workspace and the NodeData object .