Esempio n. 1
0
 /**
  * @PostPersist
  */
 public function created()
 {
     User::incrementCounter('journals', $this->user_id);
     \FA\Legacy\Notifications::dispatch('upload', $this->id);
 }
Esempio n. 2
0
 /**
  * @PostPersist
  */
 public function created()
 {
     \FA\Legacy\Notifications::dispatch('shout', $this->id, $this->recipient->id, $this->sender->id);
 }
Esempio n. 3
0
 public function setIsRead($new_value)
 {
     if ((bool) $new_value != (bool) $this->is_read) {
         if ($new_value) {
             Notifications::purge('note', $this->id, $this->recipient_id);
         } else {
             Notifications::dispatch('note', $this->id, $this->recipient_id);
         }
     }
     $this->is_read = (bool) $new_value;
 }
Esempio n. 4
0
 /**
  * @PostPersist
  */
 public function created()
 {
     User::incrementCounter('comments_sent', $this->user_id);
     User::incrementCounter('comments_received', $this->upload->user_id);
     \FA\Legacy\Notifications::dispatch('upload_comment', $this->id, $this->upload->user_id, $this->upload->id);
 }
Esempio n. 5
0
 /**
  * @PostPersist
  */
 public function created()
 {
     \FA\Legacy\Notifications::dispatch('watch', $this->id, $this->target->id, $this->user->id);
 }
Esempio n. 6
0
 /**
  * @PostPersist
  */
 public function created()
 {
     if ($this->user_id !== $this->ticket->user_id) {
         \FA\Legacy\Notifications::dispatch('ticket', $this->ticket->id, $this->ticket->user_id);
     }
 }
Esempio n. 7
0
 /**
  * @PostPersist
  */
 public function created()
 {
     \FA\Legacy\Notifications::dispatch('journal_comment', $this->id, $this->journal->user_id);
 }
Esempio n. 8
0
 /**
  * @PostPersist
  */
 public function created()
 {
     User::incrementCounter('favorites', $this->user->id);
     \FA\Legacy\Notifications::dispatch('favorite', $this->id, $this->user->id, $this->upload->id);
 }