Beispiel #1
0
 /**
  * @param int $guestAlertSID
  * @return SJB_GuestAlert
  * @throws Exception
  */
 public static function getObjectBySID($guestAlertSID)
 {
     $guestAlertInfo = self::getGuestAlertInfoBySID($guestAlertSID);
     if (empty($guestAlertInfo)) {
         throw new Exception('No such Guest Alert found');
     }
     $guestAlert = new SJB_GuestAlert($guestAlertInfo);
     $guestAlert->setSID($guestAlertSID);
     $guestAlert->addConfirmationKeyProperty(SJB_Array::get($guestAlertInfo, 'confirmation_key'));
     $guestAlert->addStatusProperty(SJB_Array::get($guestAlertInfo, 'status'));
     return $guestAlert;
 }
Beispiel #2
0
 public function execute()
 {
     $guestAlert = new SJB_GuestAlert($_REQUEST);
     $guestAlert->addDataProperty(serialize($this->criteriaData));
     $tp = SJB_System::getTemplateProcessor();
     try {
         $guestAlertSID = SJB_GuestAlertManager::getGuestAlertSIDByEmail($guestAlert->getAlertEmail());
         $guestAlert->setSID($guestAlertSID);
         $guestAlert->update();
     } catch (Exception $e) {
         $tp->assign('error', $e->getMessage());
     }
     $tp->display('alert_replaced.tpl');
 }