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);
     }
 }