Neos.ContentRepository/Classes/Domain/Service/ContextFactory.php
public function create(array $contextProperties = [])
    {
        $contextProperties = $this->mergeContextPropertiesWithDefaults($contextProperties);
        $contextIdentifier = $this->getIdentifier($contextProperties);
        if (!isset($this->contextInstances[$contextIdentifier])) {
            $this->validateContextProperties($contextProperties);
            $context = $this->buildContextInstance($contextProperties);
            $this->contextInstances[$contextIdentifier] = $context;
        }

        return $this->contextInstances[$contextIdentifier];
    }
public function create(array $contextProperties = [])
    {
        $contextProperties = $this->mergeContextPropertiesWithDefaults($contextProperties);
        $contextIdentifier = $this->getIdentifier($contextProperties);
        if (!isset($this->contextInstances[$contextIdentifier])) {
            $this->validateContextProperties($contextProperties);
            $context = $this->buildContextInstance($contextProperties);
            $this->contextInstances[$contextIdentifier] = $context;
        }

        return $this->contextInstances[$contextIdentifier];
    }
public function create ( array $ contextProperties = [ ] ) { $ contextProperties = $ this -> mergeContextPropertiesWithDefaults ( $ contextProperties ) ; $ contextIdentifier = $ this -> getIdentifier ( $ contextProperties ) ; if ( ! isset ( $ this -> contextInstances [ $ contextIdentifier ] ) ) { $ this -> validateContextProperties ( $ contextProperties ) ; $ context = $ this -> buildContextInstance ( $ contextProperties ) ; $ this -> contextInstances [ $ contextIdentifier ] = $ context ; } return $ this -> contextInstances [ $ contextIdentifier ] ; }
Create the context from the given properties. If a context with those properties was already
created before then the existing one is returned.

The context properties to give depend on the implementation of the context object, for the
Neos\ContentRepository\Domain\Service\Context it should look like this:

array(
'workspaceName' => 'live',
'currentDateTime' => new \Neos\Flow\Utility\Now(),
'dimensions' => array(...),
'targetDimensions' => array('language' => 'de', 'persona' => 'Lisa'),
'invisibleContentShown' => false,
'removedContentShown' => false,
'inaccessibleContentShown' => false
)

This array also shows the defaults that get used if you don't provide a certain property.

@param array $contextProperties
@return Context
@api
Create the context from the given properties . If a context with those properties was already created before then the existing one is returned .