Add toggle button to show/hide subtasks in task list view
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user