/** * Action for Deleteing a Acceptance Criteria */ public function deleteAction() { $params = $this->getRequest()->getParams(); if (!isset($params['acceptance'])) { throw new InvalidArgumentException(); } $acceptance = $this->repository->find($params['acceptance']); if ($acceptance) { $this->repository->delete($acceptance); $this->repository->flush(); $this->_helper->flashMessenger(getGS('Acceptance "$1" deleted.', $acceptance->getSearch())); $this->_helper->redirector->gotoSimple('index'); } }
/** * Action for Deleteing a Acceptance Criteria */ public function deleteAction() { $translator = \Zend_Registry::get('container')->getService('translator'); $params = $this->getRequest()->getParams(); if (!isset($params['acceptance'])) { throw new InvalidArgumentException(); } $acceptance = $this->repository->find($params['acceptance']); if ($acceptance) { $this->repository->delete($acceptance); $this->repository->flush(); $this->_helper->flashMessenger($translator->trans('Acceptance $1 deleted.', array('$1' => $acceptance->getSearch()), 'comments')); $this->_helper->redirector->gotoSimple('index'); } }