Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function addNotification($userId, $message, $refName, $refId) |
||
36 | { |
||
37 | $userNotification = new UserNotification(); |
||
38 | |||
39 | $userNotification->user_id = $userId; |
||
40 | $userNotification->message = $message; |
||
41 | $userNotification->ref_name = $refName; |
||
42 | $userNotification->ref_id = $refId; |
||
43 | $userNotification->status = UserNotification::STATUS_UNREAD; |
||
44 | |||
45 | $userNotification->save(); |
||
46 | |||
47 | return $userNotification; |
||
48 | } |
||
50 |