diff options
Diffstat (limited to 'app/Model/TaskFilter.php')
-rw-r--r-- | app/Model/TaskFilter.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/Model/TaskFilter.php b/app/Model/TaskFilter.php index 31080cb5..e9d9ccbd 100644 --- a/app/Model/TaskFilter.php +++ b/app/Model/TaskFilter.php @@ -513,6 +513,23 @@ class TaskFilter extends Base } /** + * Get swimlanes and tasks to display the board + * + * @access public + * @return array + */ + public function getBoard($project_id) + { + $tasks = $this->filterByProject($project_id)->query->asc(Task::TABLE.'.position')->findAll(); + + return $this->board->getBoard($project_id, function ($project_id, $column_id, $swimlane_id) use ($tasks) { + return array_filter($tasks, function(array $task) use ($column_id, $swimlane_id) { + return $task['column_id'] == $column_id && $task['swimlane_id'] == $swimlane_id; + }); + }); + } + + /** * Format the results to the ajax autocompletion * * @access public |