public function _addNotifications()
 {
     $parser = new TBGTextParser($this->_log);
     $parser->setOption('plain', true);
     $parser->doParse();
     foreach ($parser->getMentions() as $user) {
         if (!$this->getAuthor() || $user->getID() == $this->getAuthor()) {
             continue;
         }
         $notification = new TBGNotification();
         $notification->setTarget($this);
         $notification->setTriggeredByUser($this->getAuthor());
         $notification->setUser($user);
         $notification->setNotificationType(TBGVCSIntegration::NOTIFICATION_COMMIT_MENTIONED);
         $notification->setModuleName('vcs_integration');
         $notification->save();
     }
 }
Exemplo n.º 2
0
 protected function _addNotification($type, $user)
 {
     $notification = new TBGNotification();
     $notification->setTarget($this);
     $notification->setTriggeredByUser($this->getPostedByID());
     $notification->setUser($user);
     $notification->setNotificationType($type);
     $notification->save();
 }
Exemplo n.º 3
0
 protected function _addNotification($type, $user, $updated_by)
 {
     $notification = new TBGNotification();
     $notification->setTarget($this);
     $notification->setNotificationType($type);
     $notification->setTriggeredByUser($updated_by);
     $notification->setUser($user);
     $notification->save();
 }