Example #1
0
 public function _postInsert(TA_Model_Observed_Interface $subject, $msg)
 {
     $conference = Zend_Registry::get('conference');
     $submitModel = new Core_Model_Submit();
     $userModel = new Core_Model_User();
     $values['review'] = $subject->toArray();
     $values['submission'] = $submitModel->getSubmissionById($values['review']['submission_id'])->toArray();
     $values['user'] = $userModel->getUserById($values['review']['user_id'])->getSafeUser();
     $mailer = new TA_Controller_Action_Helper_SendEmail();
     $mailer->sendEmail(array('to_email' => $conference['email'], 'html' => true, 'subject' => 'CORE Observer: ' . __CLASS__, 'template' => 'review/postinsert'), $values);
 }
Example #2
0
 public function _postInsert(TA_Model_Observed_Interface $subject, $msg)
 {
     $conference = Zend_Registry::get('conference');
     $userModel = new Core_Model_User();
     $user = $userModel->getUserById($subject->user_id);
     $submitModel = new Core_Model_Submit();
     $submission = $submitModel->getSubmissionById($subject->submission_id);
     $viewParams = $submission->toArray();
     $viewParams['fname'] = $user->fname;
     $viewParams['lname'] = $user->lname;
     $mailer = new TA_Controller_Action_Helper_SendEmail();
     $mailer->sendEmail(array('to_email' => $user->email, 'subject' => 'CORE Observer: ' . __CLASS__, 'template' => 'review/observer'), $viewParams);
 }
Example #3
0
 /**
  * Send email to tiebreakers
  *
  */
 private function _mailTiebreakers($subject)
 {
     $config = Zend_Registry::get('config');
     if ($config->core->observer->tiebreaker->notify == 1) {
         $submitModel = new Core_Model_Submit();
         $submission = $submitModel->getSubmissionById($subject->submission_id);
         $users = $submission->getUsers(true);
         $viewParams = $submission->toArray();
         $mailer = new TA_Controller_Action_Helper_SendEmail();
         foreach ($users as $user) {
             $viewParams['fname'] = $user->fname;
             $viewParams['lname'] = $user->lname;
             $mailer->sendEmail(array('to_email' => $user->email, 'subject' => 'CORE Review needed', 'template' => 'review/tiebreaker'), $viewParams);
         }
     }
 }