Example #1
0
 function getSelectFromTree()
 {
     return Item::getSelectFromTree(TRUE);
 }
Example #2
0
 function populateFullCategoryTree()
 {
     global $categoryTreeFormat, $categoryTreeMainClass, $categoryTreeMainTag, $categoryTreeActiveNodeClass, $categoryTreeParentNodeClass, $categoryTreeLeafNodeClass, $categoryTreeWithLinks;
     $attrs = "id, name, up, sortId, wholeName, itemNum, permaLink, subCatNum";
     if ($categoryTreeFormat == "single_array") {
         $item = new Item();
         $categories = $item->getSelectFromTree(FALSE, TRUE, $attrs);
     } else {
         $query = "SELECT {$attrs} FROM @category WHERE up=0 ORDER BY sortId ASC";
         G::load($mainCats, $query);
         $cat = new AppCategory();
         $categories =& $cat->getCategoryTree($mainCats, $attrs, FALSE);
         if ($categoryTreeFormat == "html") {
             $categories = $cat->getHtmlTree($categories, $categoryTreeMainTag, $categoryTreeMainClass, $categoryTreeActiveNodeClass, $categoryTreeWithLinks);
         }
     }
     View::assign("fullCategoryTree", $categories);
 }