Beispiel #1
0
 protected function addCatOption(rex_category $cat, $group = null)
 {
     if (!$this->check_perms || $this->check_perms && rex::getUser()->getComplexPerm('structure')->hasCategoryPerm($cat->getId(), false)) {
         $cid = $cat->getId();
         $cname = $cat->getName() . ' [' . $cid . ']';
         if ($group === null) {
             $group = $cat->getParentId();
         }
         $this->addOption($cname, $cid, $cid, $group);
         $childs = $cat->getChildren($this->ignore_offlines, $this->clang);
         if (is_array($childs)) {
             foreach ($childs as $child) {
                 $this->addCatOption($child);
             }
         }
     }
 }
Beispiel #2
0
 /**
  * @param string              $path
  * @param rex_category        $cat
  * @param rex_yrewrite_domain $domain
  *
  * @return string
  */
 public function appendCategory($path, rex_category $cat, rex_yrewrite_domain $domain)
 {
     return $path . '/' . $this->normalize($cat->getName(), $cat->getClang());
 }