예제 #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);
             }
         }
     }
 }