Neos\Neos\Routing\FrontendNodeRoutePartHandler::buildContextFromWorkspaceNameAndDimensions PHP Method

buildContextFromWorkspaceNameAndDimensions() protected method

Sets context properties like "invisibleContentShown" according to the workspace (live or not) and returns a ContentContext object.
protected buildContextFromWorkspaceNameAndDimensions ( string $workspaceName, array $dimensionsAndDimensionValues ) : ContentContext
$workspaceName string Name of the workspace to use in the context
$dimensionsAndDimensionValues array An array of dimension names (index) and their values (array of strings). See also: ContextFactory
return Neos\Neos\Domain\Service\ContentContext
    protected function buildContextFromWorkspaceNameAndDimensions($workspaceName, array $dimensionsAndDimensionValues)
    {
        $contextProperties = ['workspaceName' => $workspaceName, 'invisibleContentShown' => $workspaceName !== 'live', 'inaccessibleContentShown' => $workspaceName !== 'live', 'dimensions' => $dimensionsAndDimensionValues];
        return $this->contextFactory->create($contextProperties);
    }