private function getCategoryTree($radio_buttons = false)
 {
     include_once _GIVEIT_CLASSES_DIR_ . '/HelperTreeCategories.php';
     $selected_cat = !$radio_buttons ? GiveItCategory::getCategories() : array(Category::getRootCategory()->id);
     $tree = new GiveItHelperTreeCategoriesCore('associated-categories-tree', 'Associated categories');
     $tree->setRootCategory(Category::getRootCategory()->id)->setUseCheckBox(!$radio_buttons)->setUseSearch(true)->setSelectedCategories($selected_cat);
     $tree->render();
 }
Пример #2
0
 private function saveSingleCategory($id_category, $id_shop)
 {
     $give_it_category_obj = new GiveItCategory();
     $give_it_category_obj->id_category = (int) $id_category;
     $give_it_category_obj->id_shop = (int) $id_shop;
     return $give_it_category_obj->save();
 }