Beispiel #1
0
 /**
  * @param type $input
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public function newAnswer($input)
 {
     $this->_applicant->lock();
     $this->_controller->getEntityManager()->persist($this->_applicant);
     $this->_controller->addMessage('success', 'Your application has been submitted.');
     $this->_controller->redirectUrl($this->_controller->getActionPath());
 }
Beispiel #2
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');
     }
 }
Beispiel #3
0
 /**
  * Skip an optional page
  *
  */
 public function do_skip()
 {
     if ($this->_applicant->getExternalId()) {
         $this->_controller->addMessage('error', 'You have already set your external ID, you must delete it before you can skip this page.');
         return false;
     }
     if (!$this->_applicationPage->isRequired()) {
         $answer = new \Jazzee\Entity\Answer();
         $answer->setPage($this->_applicationPage->getPage());
         $this->_applicant->addAnswer($answer);
         $answer->setPageStatus(self::SKIPPED);
         $this->_controller->getEntityManager()->persist($answer);
     }
 }