summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/Project.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Model/Project.php b/app/Model/Project.php
index 52500820..6e4cfcfd 100644
--- a/app/Model/Project.php
+++ b/app/Model/Project.php
@@ -172,6 +172,18 @@ class Project extends Base
{
return $this->db->table(self::TABLE)->asc('name')->findAll();
}
+
+ /**
+ * Get all projects with given Ids
+ *
+ * @access public
+ * @param integer[] $project_ids Projects id
+ * @return array
+ */
+ public function getAllByIds($project_ids)
+ {
+ return $this->db->table(self::TABLE)->in('id', $project_ids)->asc('name')->findAll();
+ }
/**
* Get all project ids