/** * Удаление вакансии * @return void */ public function removeAction() { if ($this->_authorize('vacancies', 'remove')) { $objVacancies = new Vacancies(); $vacancy = $objVacancies->getObjectById($this->_request->getParam('vacancyId')); try { if (!$vacancy instanceof Vacancy) { throw new Zend_Exception('Error while deleting vacancy.'); } $vacancy->delete(); } catch (Exception $ex) { $this->view->error = $ex->getMessage(); $this->_forward('index', 'vacancy'); } $this->_redirect('vacancy'); } }