/** * Called from the legacy HRT system when the PLL's reference fails for some reason. * * This can be called only after payment has been attempted. */ public function noticeAction() { $session = new Zend_Session_Namespace('referencing_global'); if (empty($session->referenceId)) { //User is logged in, but they do not have a reference number, so ignore this and go to //the start of the data entry process. return $this->_helper->redirector('property-lease'); } //Retrieve the latest notice flagged against the reference. $noticeManager = new Manager_Referencing_UserNotices(); $notice = $noticeManager->getLatestNotice($session->referenceId); if (empty($notice)) { //Not notices flagged against the reference, so go to the start page of the //data entry process. return $this->_helper->redirector('property-lease'); } //Retrieve the referencing details so that relevant details can be replaced into the //notice. $referenceManager = new Manager_Referencing_Reference(); $reference = $referenceManager->getReference($session->referenceId); //Replace placeholders appropriate. $notice = preg_replace("/\\[--EXTERNALID--\\]/", $reference->externalId, $notice); $notice = preg_replace("/\\[--INTERNALID--\\]/", $reference->internalId, $notice); $this->view->notice = $notice; //Tell page to use AJAX validation as we go $this->view->headScript()->appendScript('var ajaxValidate = true; var ajaxValidatePage = 1;'); }
/** * Inserts a user notice into the datasource. * * The user notice is displayed to the user after payment has been made for * a referencing service. * * @param integer $noticeId * The unique user notice identifier. * * @param integer $referenceId * The unique Reference (Enquiry) identifer. * * @return boolean * True on success, false otherwise. */ public function insertNotice($noticeId, $referenceId) { $noticeManager = new Manager_Referencing_UserNotices(); return $noticeManager->insertNoticeMap($noticeId, $referenceId); }