public function info($term_taxonomy_id = NULL) { if (in_array(Auth::getCapability(), array(CAPABILITY_ADMINISTRATOR))) { Model::autoloadModel('style'); $model = new StyleModel($this->db); $this->para = new stdClass(); if (isset($_POST['style'])) { $this->para->term_taxonomy_id = $_POST['style']; } elseif (isset($term_taxonomy_id) && !is_null($term_taxonomy_id)) { $this->para->term_taxonomy_id = $term_taxonomy_id; } if (isset($this->para->term_taxonomy_id)) { $this->view->styleBO = $model->get($this->para->term_taxonomy_id); $this->view->parentList = new SplDoublyLinkedList(); $model->getAllSorted($this->view->parentList, $model->buildTree($model->getAll("style")), -1); if (isset($term_taxonomy_id) && !is_null($term_taxonomy_id)) { $this->view->renderAdmin(RENDER_VIEW_STYLE_INFO); } else { $this->view->renderAdmin(RENDER_VIEW_STYLE_INFO, TRUE); } } else { header('location: ' . URL . CONTEXT_PATH_STYLE_INDEX); } } else { $this->login(); } }