Neos\ContentRepository\Domain\Service\ContextFactory::mergeContextPropertiesWithDefaults PHP Method

mergeContextPropertiesWithDefaults() protected method

Merges the given context properties with sane defaults for the context implementation.
protected mergeContextPropertiesWithDefaults ( array $contextProperties ) : array
$contextProperties array
return array
    protected function mergeContextPropertiesWithDefaults(array $contextProperties)
    {
        $contextProperties = $this->removeDeprecatedProperties($contextProperties);
        $defaultContextProperties = array('workspaceName' => 'live', 'currentDateTime' => $this->now, 'dimensions' => array(), 'targetDimensions' => array(), 'invisibleContentShown' => false, 'removedContentShown' => false, 'inaccessibleContentShown' => false);
        $mergedProperties = Arrays::arrayMergeRecursiveOverrule($defaultContextProperties, $contextProperties, true);
        $this->mergeDimensionValues($contextProperties, $mergedProperties);
        $this->mergeTargetDimensionContextProperties($contextProperties, $mergedProperties, $defaultContextProperties);
        return $mergedProperties;
    }