diff options
Diffstat (limited to 'app/Controller/Calendar.php')
-rw-r--r-- | app/Controller/Calendar.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/app/Controller/Calendar.php b/app/Controller/Calendar.php index 8a24d705..5ac92622 100644 --- a/app/Controller/Calendar.php +++ b/app/Controller/Calendar.php @@ -52,6 +52,12 @@ class Calendar extends Base // Tasks with due date $events = array_merge($events, $filter->copy()->filterByDueDateRange($start, $end)->toAllDayCalendarEvents()); + $events = $this->hook->merge('controller:calendar:project:events', $events, array( + 'project_id' => $project_id, + 'start' => $start, + 'end' => $end, + )); + $this->response->json($events); } @@ -83,10 +89,11 @@ class Calendar extends Base $events = array_merge($events, $this->subtaskTimeTracking->getUserCalendarEvents($user_id, $start, $end)); } - // Subtask estimates - if ($this->config->get('calendar_user_subtasks_forecast') == 1) { - $events = array_merge($events, $this->subtaskForecast->getCalendarEvents($user_id, $end)); - } + $events = $this->hook->merge('controller:calendar:user:events', $events, array( + 'user_id' => $user_id, + 'start' => $start, + 'end' => $end, + )); $this->response->json($events); } |