Add toggle button to show/hide subtasks in task list view

This commit is contained in:
Frederic Guillot
2017-02-26 19:30:02 -05:00
parent 4f325193be
commit f3deb6492a
28 changed files with 257 additions and 89 deletions

View File

@@ -16,13 +16,13 @@ class TaskListFormatter extends BaseFormatter implements FormatterInterface
* Apply formatter
*
* @access public
* @return mixed
* @return array
*/
public function format()
{
$tasks = $this->query->findAll();
$taskIds = array_column($tasks, 'id');
$tags = $this->taskTagModel->getTagsByTasks($taskIds);
$tags = $this->taskTagModel->getTagsByTaskIds($taskIds);
array_merge_relation($tasks, $tags, 'tags', 'id');
return $tasks;