getDefaultLocalization() публичный Метод

public getDefaultLocalization ( ) : Localization
Результат Sulu\Component\Localization\Localization
Пример #1
0
 /**
  * @param Portal      $portal
  * @param Environment $environment
  * @param string      $urlAddress
  * @param string      $urlAnalyticsKey
  */
 private function buildUrlPartialMatch(Portal $portal, Environment $environment, $urlAddress, $urlAnalyticsKey)
 {
     $replacers = [self::REPLACER_LANGUAGE => $portal->getDefaultLocalization()->getLanguage(), self::REPLACER_COUNTRY => $portal->getDefaultLocalization()->getCountry(), self::REPLACER_LOCALIZATION => $portal->getDefaultLocalization()->getLocalization('-')];
     $defaultSegment = $portal->getWebspace()->getDefaultSegment();
     if ($defaultSegment) {
         $replacers[self::REPLACER_SEGMENT] = $defaultSegment->getKey();
     }
     $urlResult = $this->removeUrlPlaceHolders($urlAddress);
     $urlRedirect = $this->generateUrlAddress($urlAddress, $replacers);
     if ($this->validateUrlPartialMatch($urlResult, $environment)) {
         $this->portalInformations[$environment->getType()][$urlResult] = new PortalInformation(RequestAnalyzerInterface::MATCH_TYPE_PARTIAL, $portal->getWebspace(), $portal, $portal->getDefaultLocalization(), $urlResult, $portal->getWebspace()->getDefaultSegment(), $urlRedirect, $urlAnalyticsKey);
     }
 }