public function index() { $authLists = $this->AuthRole->get_auths(); $tree = new Tree($authLists); $auth = $tree->leaf(); $this->assign('auth', $auth); $this->assign('tree', $this->AuthRole->format_tree($authLists)); $this->display(); }
public function getCategoriesTree() { $categories = $this->category->getCategories(); $tree = new Tree($categories); $categories = $tree->leaf(); $tree = $this->category->format_tree($categories, true, false); if (IS_AJAX) { echo $tree; } else { return $tree; } }