@@ 61-71 (lines=11) @@ | ||
58 | * |
|
59 | * @return array |
|
60 | */ |
|
61 | public function getProjectEvents($project_id, $limit = 50) |
|
62 | { |
|
63 | $queryBuilder = $this->projectActivityQuery |
|
64 | ->withFilter(new ProjectActivityProjectIdFilter($project_id)); |
|
65 | ||
66 | $queryBuilder->getQuery() |
|
67 | ->desc(ProjectActivityModel::TABLE.'.id') |
|
68 | ->limit($limit); |
|
69 | ||
70 | return $queryBuilder->format(new ProjectActivityEventFormatter($this->container)); |
|
71 | } |
|
72 | ||
73 | /** |
|
74 | * Get projects activity events. |
|
@@ 81-91 (lines=11) @@ | ||
78 | * |
|
79 | * @return array |
|
80 | */ |
|
81 | public function getProjectsEvents(array $project_ids, $limit = 50) |
|
82 | { |
|
83 | $queryBuilder = $this->projectActivityQuery |
|
84 | ->withFilter(new ProjectActivityProjectIdsFilter($project_ids)); |
|
85 | ||
86 | $queryBuilder->getQuery() |
|
87 | ->desc(ProjectActivityModel::TABLE.'.id') |
|
88 | ->limit($limit); |
|
89 | ||
90 | return $queryBuilder->format(new ProjectActivityEventFormatter($this->container)); |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * Get task activity events. |
|
@@ 100-108 (lines=9) @@ | ||
97 | * |
|
98 | * @return array |
|
99 | */ |
|
100 | public function getTaskEvents($task_id) |
|
101 | { |
|
102 | $queryBuilder = $this->projectActivityQuery |
|
103 | ->withFilter(new ProjectActivityTaskIdFilter($task_id)); |
|
104 | ||
105 | $queryBuilder->getQuery()->desc(ProjectActivityModel::TABLE.'.id'); |
|
106 | ||
107 | return $queryBuilder->format(new ProjectActivityEventFormatter($this->container)); |
|
108 | } |
|
109 | } |
|
110 |