public function do_unskip() { $answers = $this->_applicant->findAnswersByPage($this->_applicationPage->getPage()); if (count($answers) and $answers[0]->getPageStatus() == self::SKIPPED) { $this->_applicant->getAnswers()->removeElement($answers[0]); $this->_controller->getEntityManager()->remove($answers[0]); } }
public function deleteAnswer($answerId) { if ($answer = $this->_applicant->findAnswerById($answerId)) { $this->_controller->getEntityManager()->remove($answer); $this->_applicant->getAnswers()->removeElement($answer); $this->_applicant->markLastUpdate(); $this->_controller->getEntityManager()->persist($this->_applicant); $this->_controller->addMessage('success', 'Answered Deleted Successfully'); } }