/**
  * Additionally add the current site and domain to the Context properties.
  *
  * {@inheritdoc}
  */
 protected function prepareContextProperties($workspaceName, \TYPO3\Flow\Property\PropertyMappingConfigurationInterface $configuration = null, array $dimensions = null)
 {
     $contextProperties = parent::prepareContextProperties($workspaceName, $configuration, $dimensions);
     $currentDomain = $this->domainRepository->findOneByActiveRequest();
     if ($currentDomain !== null) {
         $contextProperties['currentSite'] = $currentDomain->getSite();
         $contextProperties['currentDomain'] = $currentDomain;
     } else {
         $contextProperties['currentSite'] = $this->siteRepository->findFirstOnline();
     }
     return $contextProperties;
 }