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