_getDataObj(); $params = ['action' => 'new']; if (is_numeric($categoryId = $dataObj->getFilter('categoryId'))) { $params['categoryId'] = $categoryId; } $links = []; $links[] = ['title' => 'Add New ' . $dataObj->getConfig('itemName'), 'url' => $this->url($params)]; $params['action'] = 'reorder'; $links['reorder'] = [ 'title' => 'Reorder ' . $dataObj->getConfig('itemsName'), 'url' => $this->url($params), ]; $fullAlias = Qs_SiteMap::findFirst( null, ['type' => 'Faq_Category_Admin_'], null, 'fullAlias' ); if (false !== $fullAlias) { $links[] = [ 'title' => 'Manage ' . App_Faq_Category_Admin_Obj::getInstance()->getConfig('itemsName'), 'url' => $fullAlias, ]; } return $links; } protected function _initAction() { parent::_initAction(); if (in_array($this->_action, ['reorder', 'updateOrder'])) { if (is_numeric($categoryId = Qs_Request::getGetValue('categoryId'))) { $this->_getDataObj()->addFilter(['categoryId' => $categoryId]); } } return $this; } }