/** * 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); } }
/** * Get an applicants action status * @param \Jazzee\Entity\Applicant $applicant */ protected function getActions(\Jazzee\Entity\Applicant $applicant) { $actions = array('createdAt' => $applicant->getCreatedAt(), 'updatedAt' => $applicant->getUpdatedAt(), 'lastLogin' => $applicant->getLastLogin(), 'deadlineExtension' => $applicant->getDeadlineExtension(), 'externalId' => $applicant->getExternalId(), 'allowExtendDeadline' => $this->checkIsAllowed($this->controllerName, 'extendDeadline'), 'allowEditExternalId' => $this->checkIsAllowed($this->controllerName, 'editExternalId')); return $actions; }
/** * PDF a full single applicant * @param \Jazzee\Entity\Applicant $applicant * @return string the PDF buffer suitable for display */ public function pdf(\Jazzee\Entity\Applicant $applicant) { $elements = array('applicant' => array(), 'pages' => array()); $elements['applicant']['firstName'] = $applicant->getFirstName(); $elements['applicant']['lastName'] = $applicant->getLastName(); $elements['applicant']['middleName'] = $applicant->getMiddleName(); $elements['applicant']['fullName'] = $applicant->getFullName(); $elements['applicant']['suffix'] = $applicant->getSuffix(); $elements['applicant']['email'] = $applicant->getEmail(); $elements['applicant']['id'] = $applicant->getId(); $elements['applicant']['externalid'] = $applicant->getExternalId(); if ($applicant->isLocked()) { switch ($applicant->getDecision()->status()) { case 'finalDeny': $status = 'Denied'; break; case 'finalAdmit': $status = 'Admited'; break; case 'acceptOffer': $status = 'Accepted'; break; case 'declineOffer': $status = 'Declined'; break; default: $status = 'No Decision'; } } else { $status = 'Not Locked'; } $elements['applicant']['status'] = $status; foreach ($applicant->getApplication()->getApplicationPages() as $applicationPage) { if ($applicationPage->getJazzeePage() instanceof \Jazzee\Interfaces\PdfPage) { $applicationPage->getJazzeePage()->setApplicant($applicant); $applicationPage->getJazzeePage()->setController($this->_controller); $elements['pages'][$applicationPage->getPage()->getId()] = $applicationPage->getJazzeePage()->getPdfTemplateValues(); } } return $this->generatePDF($elements); }