From 4a87fb34ba0a88303282923a73a8fef83d7aada3 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 26 Feb 2017 15:18:49 -0500 Subject: Display tags in task list view --- app/Formatter/TaskListFormatter.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 app/Formatter/TaskListFormatter.php (limited to 'app/Formatter') diff --git a/app/Formatter/TaskListFormatter.php b/app/Formatter/TaskListFormatter.php new file mode 100644 index 00000000..01fbbae0 --- /dev/null +++ b/app/Formatter/TaskListFormatter.php @@ -0,0 +1,30 @@ +query->findAll(); + $taskIds = array_column($tasks, 'id'); + $tags = $this->taskTagModel->getTagsByTasks($taskIds); + array_merge_relation($tasks, $tags, 'tags', 'id'); + + return $tasks; + } +} -- cgit v1.2.3