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, 'currentSite' => null, 'currentDomain' => null); if (!isset($contextProperties['currentSite'])) { $defaultContextProperties = $this->setDefaultSiteAndDomainFromCurrentRequest($defaultContextProperties); } $mergedProperties = Arrays::arrayMergeRecursiveOverrule($defaultContextProperties, $contextProperties, true); $this->mergeDimensionValues($contextProperties, $mergedProperties); $this->mergeTargetDimensionContextProperties($contextProperties, $mergedProperties, $defaultContextProperties); return $mergedProperties; }