_restParams) > 1) { $this->_doc->display404(); } $categoryAlias = $this->_restAlias; /** @var $dataObj App_Faq_Obj */ $dataObj = $this->_getDataObj(); if (null == $categoryAlias) { $categoryAlias = $dataObj->getNotEmptyCategoryAlias(); if ($categoryAlias) { Qs_Http::redirect(BASE_URL_LANGUAGE . '/' . CURRENT_PAGE_FINAL . '/' . $categoryAlias); } } elseif ($categoryAlias === $dataObj::NO_CATEGORY_ALIAS) { Qs_Http::redirect(BASE_URL_LANGUAGE . '/' . CURRENT_PAGE_FINAL, 301); } if (null !== $categoryAlias) { if (/* No Category */ '' === $categoryAlias) { $this->_category = ['id' => null, 'title' => App_Faq_Obj::NO_CATEGORY_TITLE]; } elseif (false === ($this->_category = $dataObj->getCategoryData(['alias' => $categoryAlias])) || 0 == $this->_category['faqCount'] ) { $this->_doc->display404(); return false; } $dataObj->setCategoryId($this->_category['id']); } if ($this->_category) { $this->_initPageSeo($this->_category); } 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; } public function writeXmlSitemap(App_Sitemap_Xml_Writer $xml) { return $this->writeDefaultXmlSitemap($xml); } }