getRestParams(); if (count($params) == 1 && is_numeric($params[0])) { $id = intval($params[0]); $this->_getDataObj()->setIdPost($id); if (($title = $this->_getDataObj()->getPostTitle())) { $itemsName = $this->getConfig('itemsName'); $this->_doc->setHeader("Manage {$itemsName} for \"{$title}\" Blog Post"); } } else { $this->_doc->display404(); } return parent::exec(); } protected function _getNewForm(array $options = array()) { $options = array('defaults' => array('idPost' => $this->_getDataObj()->getIdPost())); return $this->_getFormInstance('new', $options); } protected function _doGoBack() { $backUrl = $this->_getBackUrl(PARENT_PAGE_FINAL, BASE_URL_LANGUAGE . '/' . PARENT_PAGE_FINAL); $this->_clearBackUrl(); \Qs_Http::redirect($backUrl); } protected function _getDefaultLinks() { $links = parent::_getDefaultLinks(); $links['goBack'] = 'Manage ' . \Qs_Application::getConfig('Blog\\Admin\\')->get('itemsName'); return $links; } protected function _doAutocompleteValue() { $this->_doAutocompleteValueAjax(); } protected function _doAutocompleteValueAjax() { $query = \Qs_Request::getRequestValue('term'); $data = $this->_getDataObj()->getAutocompleteList($query); $this->_displayJson($data); } }