protected function setDefaultSiteAndDomainFromCurrentRequest(array $defaultContextProperties)
    {
        $currentDomain = $this->domainRepository->findOneByActiveRequest();
        if ($currentDomain !== null) {
            $defaultContextProperties['currentSite'] = $currentDomain->getSite();
            $defaultContextProperties['currentDomain'] = $currentDomain;
        } else {
            $defaultContextProperties['currentSite'] = $this->siteRepository->findDefault();
        }

        return $defaultContextProperties;
    }