_restAlias; /** @var $dataObj App_Faq_Obj */ $dataObj = $this->_getDataObj(); if (!isset($categoryId)) { if (null == $categoryId) { $categoryId = $dataObj->getNotEmptyCategory(); if (!empty($categoryId)) { Qs_Http::redirect(BASE_URL_LANGUAGE . '/' . CURRENT_PAGE_FINAL . '/' . $categoryId); } } } $categoryId = filter_var($categoryId, FILTER_VALIDATE_INT, array('options' => array('min_range' => 0))); if (false !== $categoryId) { $categories = $dataObj->getNotEmptyCategories(); if (!array_key_exists($categoryId, $categories)) { $this->_doc->display404(); } if (0 == $categoryId) { $this->_category = array('id' => 0, 'title' => App_Faq_Obj::NO_CATEGORY_TITLE); } else if (false === ($this->_category = $dataObj->findCategoryId($categoryId)) || $this->_category->show != 'y') { $this->_doc->display404(); return false; } $dataObj->setCategoryId($categoryId); } else { $this->_doc->display404(); } if ($dataObj->getCategoriesCount() > 1) { $this->_doc->appendTitle(' :: ' . $this->_category['title']); $this->_doc->appendHeader(' - ' . $this->_category['title']); } return parent::exec(); } protected function _getList() { $this->_list = parent::_getList(); /** @var $dataObj App_Faq_Obj */ $dataObj = $this->_getDataObj(); $this->_list->categories = $dataObj->getNotEmptyCategories(); $this->_list->category = $this->_category; if ($this->_list->category['id'] == 0) { $this->_list->category['id'] = ''; } $ipp = $this->getConfig('ipp'); if (empty($ipp)) { $this->_list->setIsDisabledLimit(true); } else { $this->_list->setDefaultIpp($ipp); } return $this->_list; } protected function _getLog() { if (null === $this->_log) { parent::_getLog(); $this->_log->setAction('list', 'Viewed "%categoryTitle%" %itemsName% list'); } return $this->_log; } }