_restParams)) { $this->_do404(); } $committeeId = $this->_restParams[0]; if (!ctype_digit($committeeId) || !($committeeId = intval($committeeId)) ) { $this->_do404(); } $committeeObj = new CommitteeObj(); $committeeObj->setPrimaryKey($committeeId); if (!($data = $committeeObj->getData())) { $this->_do404(); } $this->_getDataObj()->setCommitteeId($committeeId); $this->_doc->setHeader('Manage "' . $data['name'] . '" Committee ' . $this->getConfig('itemsName') ); return parent::exec(); } public static function getListUrl($committeeId = null) { $committeeId = $committeeId ? $committeeId : '%d'; return static::getPage('url') . '/' . $committeeId; } public static function addNewDocumentUrl($committeeId = null) { $committeeId = $committeeId ? $committeeId : '%d'; return static::getPage('url') . '/' . $committeeId . '?action=new'; } protected function _getDefaultLinks() { $links = parent::_getDefaultLinks(); $links[] = ['url' => \App\Committee\Admin\View::getBackUrl(), 'title' => 'Back to Committees']; return $links; } }