From 1fa72295f20aa9794f1b33dfde95960c34d85366 Mon Sep 17 00:00:00 2001 From: Timo Litzbarski Date: Fri, 18 Sep 2015 14:18:34 +0000 Subject: User-Api: add getMyPorjects (#1233) --- app/Model/Project.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'app/Model/Project.php') 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 -- cgit v1.2.3