Beispiel #1
0
 protected function _addNotification($type, $user, $updated_by)
 {
     $notification = new Notification();
     $notification->setTarget($this);
     $notification->setNotificationType($type);
     $notification->setTriggeredByUser($updated_by);
     $notification->setUser($user);
     $notification->save();
 }
Beispiel #2
0
 protected function _addNotification($type, $user)
 {
     $notification = new Notification();
     $notification->setTarget($this);
     $notification->setTriggeredByUser($this->getPostedByID());
     $notification->setUser($user);
     $notification->setNotificationType($type);
     $notification->save();
 }
Beispiel #3
0
 /**
  * @param Notification $notification
  */
 public function markNotificationGroupedNotificationsRead(\thebuggenie\core\entities\Notification $notification)
 {
     if ($notification->getNotificationType() != \thebuggenie\core\entities\Notification::TYPE_ISSUE_UPDATED) {
         return;
     }
     tables\Notifications::getTable()->markUserNotificationsReadByTypesAndIdAndGroupableMinutes(array(\thebuggenie\core\entities\Notification::TYPE_ISSUE_UPDATED), $notification->getTargetID(), $this->getID(), $this->getNotificationSetting(framework\Settings::SETTINGS_USER_NOTIFY_GROUPED_NOTIFICATIONS, false, 'core')->getValue(), (int) $notification->isRead(), false);
 }
Beispiel #4
0
 public function _addNotifications()
 {
     $parser = new TextParser($this->_log);
     $parser->setOption('plain', true);
     $parser->doParse();
     foreach ($parser->getMentions() as $user) {
         if (!$this->getAuthor() || $user->getID() == $this->getAuthor()) {
             continue;
         }
         $notification = new \thebuggenie\core\entities\Notification();
         $notification->setTarget($this);
         $notification->setTriggeredByUser($this->getAuthor());
         $notification->setUser($user);
         $notification->setNotificationType(Vcs_integration::NOTIFICATION_COMMIT_MENTIONED);
         $notification->setModuleName('vcs_integration');
         $notification->save();
     }
 }