/** * Display all categories * * @access public * @author Nguyen Van Hiep * * @version 1.0 * @since 1.0 */ public function action_index() { $view = View::forge('admin/categories/index'); $view->cats = Model_Categories::get_all_cats(Input::get('lang')); $view->all_cats = Model_Categories::get_all_cats(null); $view->select_lang = Input::get('lang', ''); $view->langs = array('' => '---'); foreach (glob(LANG_DIR . '/*', GLOB_ONLYDIR) as $lang_dir) { $short_lang = str_replace(LANG_DIR . '/', '', $lang_dir); $view->langs[$short_lang] = $short_lang; } $this->template->title = __('cat.categories'); $this->template->content = $view; }