public function sent()
 {
     if ($this->isAlreadySent()) {
         throw new EntityValidationException(array('Push notification already sent!.'));
     }
     $this->IsSent = true;
     $this->SentDate = MySQLDatabase56::nowRfc2822();
 }
 /**
  * @param IMessageSenderService $sender_service
  * @return void
  */
 public function reject(IMessageSenderService $sender_service = null)
 {
     if (!is_null($sender_service)) {
         $sender_service->send($this);
     }
     $this->Rejected = true;
     $this->RejectedDate = MySQLDatabase56::nowRfc2822();
     $this->RejectedByID = Member::currentUserID();
 }
Exemplo n.º 3
0
 /**
  * @param string $status
  * @throws Exception
  */
 public function markAsProcessed($status)
 {
     if ($this->Processed) {
         throw new Exception('EventbriteEvent already processed!');
     }
     $this->Processed = true;
     $this->ProcessedDate = MySQLDatabase56::nowRfc2822();
     $this->FinalStatus = $status;
 }
Exemplo n.º 4
0
 public function publish()
 {
     if ($this->Published) {
         throw new EntityValidationException(array('Already published Summit Event'));
     }
     $validation_result = $this->validate();
     if (!$validation_result->valid()) {
         throw new EntityValidationException($validation_result->messageList());
     }
     if (intval($this->AllowedSummitTypes()->count()) === 0) {
         throw new EntityValidationException(array('To publish this event you must associate a valid summit type!'));
     }
     $start_date = $this->getStartDate();
     $end_date = $this->getEndDate();
     if (empty($start_date) || empty($end_date)) {
         throw new EntityValidationException(array('To publish this event you must define a start/end datetime!'));
     }
     $this->Published = true;
     $this->PublishedDate = MySQLDatabase56::nowRfc2822();
 }
Exemplo n.º 5
0
 /**
  * @return void
  */
 public function registerSummitHallChecking()
 {
     if ($this->SummitHallCheckedIn) {
         return;
     }
     $this->SummitHallCheckedIn = true;
     $this->SummitHallCheckedInDate = MySQLDatabase56::nowRfc2822();
 }
Exemplo n.º 6
0
 public function registerAnnouncementEmailTypeSent($email_type, $summit_id)
 {
     if ($this->announcementEmailAlreadySent($summit_id)) {
         throw new Exception('Announcement Email already sent');
     }
     $email = SpeakerAnnouncementSummitEmail::create();
     $email->SpeakerID = $this->ID;
     $email->SummitID = $summit_id;
     $email->AnnouncementEmailTypeSent = $email_type;
     $email->AnnouncementEmailSentDate = MySQLDatabase56::nowRfc2822();
     $email->write();
 }
 /**
  * @return $this
  * @throws Exception
  */
 public function registerCreateMembershipSent()
 {
     if ($this->membershipCreateEmailAlreadySent()) {
         throw new Exception('Create Membership Email already sent');
     }
     $email = SpeakerAnnouncementSummitEmail::create();
     $email->SpeakerID = $this->ID;
     $email->SummitID = 0;
     $email->AnnouncementEmailTypeSent = 'CREATE_MEMBERSHIP';
     $email->AnnouncementEmailSentDate = MySQLDatabase56::nowRfc2822();
     $email->write();
     return $this;
 }
Exemplo n.º 8
0
 /**
  * @param string $email_type
  * @throws Exception
  */
 public function registerAnnouncementEmailTypeSent($email_type)
 {
     if ($this->announcementEmailAlreadySent()) {
         throw new Exception('Announcement Email already sent');
     }
     $this->AnnouncementEmailTypeSent = $email_type;
     $this->AnnouncementEmailSentDate = MySQLDatabase56::nowRfc2822();
 }
 public function approve()
 {
     if ($this->Approved) {
         throw new Exception('Already approved feedback Summit Event');
     }
     $this->Approved = true;
     $this->ApprovedDate = MySQLDatabase56::nowRfc2822();
     $this->ApprovedByID = Member::currentUserID();
 }