diff options
Diffstat (limited to 'app/Model/SubtaskModel.php')
-rw-r--r-- | app/Model/SubtaskModel.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/Model/SubtaskModel.php b/app/Model/SubtaskModel.php index af9af93b..c62ddb53 100644 --- a/app/Model/SubtaskModel.php +++ b/app/Model/SubtaskModel.php @@ -132,6 +132,23 @@ class SubtaskModel extends Base } /** + * Get subtasks for a list of tasks + * + * @param array $taskIds + * @return array + */ + public function getAllByTaskIds(array $taskIds) + { + if (empty($taskIds)) { + return array(); + } + + return $this->subtaskListFormatter + ->withQuery($this->getQuery()->in('task_id', $taskIds)) + ->format(); + } + + /** * Get a subtask by the id * * @access public |