app/Models/ActionModel.php 1 location
|
@@ 56-62 (lines=7) @@
|
53 |
|
* |
54 |
|
* @return array |
55 |
|
*/ |
56 |
|
public function getAllByProject($project_id) |
57 |
|
{ |
58 |
|
$actions = $this->db->table(self::TABLE)->eq('project_id', $project_id)->findAll(); |
59 |
|
$params = $this->actionParameterModel->getAllByActions(array_column($actions, 'id')); |
60 |
|
|
61 |
|
return $this->attachParamsToActions($actions, $params); |
62 |
|
} |
63 |
|
|
64 |
|
/** |
65 |
|
* Return all actions and parameters. |
app/Models/UserUnreadNotificationModel.php 1 location
|
@@ 70-79 (lines=10) @@
|
67 |
|
* |
68 |
|
* @return array |
69 |
|
*/ |
70 |
|
public function getAll($user_id) |
71 |
|
{ |
72 |
|
$events = $this->db->table(self::TABLE)->eq('user_id', $user_id)->desc('date_creation')->findAll(); |
73 |
|
|
74 |
|
foreach ($events as &$event) { |
75 |
|
$this->unserialize($event); |
76 |
|
} |
77 |
|
|
78 |
|
return $events; |
79 |
|
} |
80 |
|
|
81 |
|
/** |
82 |
|
* Mark a notification as read. |