/** * When called, reloads the Page Edition panel * * @param int $id_page */ protected function _reload_panel($id_page) { $page = $this->page_model->get_by_id($id_page, Settings::get_lang('default')); $page['menu'] = $this->menu_model->get($page['id_menu']); $title = empty($page['title']) ? $page['name'] : $page['title']; $this->callback[] = array('fn' => 'ION.splitPanel', 'args' => array('urlMain' => admin_url(TRUE) . 'page/edit/' . $id_page, 'urlOptions' => admin_url(TRUE) . 'page/get_options/' . $id_page, 'title' => lang('ionize_title_edit_page') . ' : ' . $title)); $this->callback[] = array('fn' => $page['menu']['name'] . 'Tree.updateElement', 'args' => array($page, 'page')); }
/** * Reloads the Edition panel * * @param int $id_page * @param int $id_article */ protected function _reload_panel($id_page, $id_article) { $page = $this->page_model->get_by_id($id_page); $id_menu = array_key_exists('id_menu', $page) ? (int) $page['id_menu'] : 0; $page['menu'] = $this->menu_model->get($id_menu); // Main data $article = $this->article_model->get_by_id($id_article); $article_lang = $this->article_model->get_by_id($id_article, Settings::get_lang('default')); $title = empty($article_lang['title']) ? $article_lang['name'] : $article_lang['title']; // Correcting some lang data $article_lang['online'] = $article['online']; $this->callback[] = array('fn' => 'ION.splitPanel', 'args' => array('urlMain' => admin_url(TRUE) . 'article/edit/' . $id_page . '.' . $id_article, 'urlOptions' => admin_url(TRUE) . 'article/get_options/' . $id_page . '.' . $id_article, 'title' => lang('ionize_title_edit_article') . ' : ' . $title)); $this->callback[] = array('fn' => array_key_exists('name', $page['menu']) ? $page['menu']['name'] . 'Tree.updateElement' : '', 'args' => array($article_lang, 'article')); }