Exemple #1
0
 public static function addDomain(rex_yrewrite_domain $domain)
 {
     foreach ($domain->getClangs() as $clang) {
         self::$domainsByMountId[$domain->getMountId()][$clang] = $domain;
     }
     self::$domainsByName[$domain->getName()] = $domain;
 }
Exemple #2
0
 /**
  * @param rex_article         $art
  * @param rex_yrewrite_domain $domain
  *
  * @return string|false
  */
 public function getCustomUrl(rex_article $art, rex_yrewrite_domain $domain)
 {
     if ($domain->getStartId() == $art->getId()) {
         if ($domain->getStartClang() == $art->getClang()) {
             return '/';
         }
         return $this->getClang($art->getClang(), $domain) . '/';
     }
     if ($url = $art->getValue('yrewrite_url')) {
         return $url;
     }
     return false;
 }