summaryrefslogtreecommitdiff
path: root/app/Model/GroupModel.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/GroupModel.php')
-rw-r--r--app/Model/GroupModel.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/app/Model/GroupModel.php b/app/Model/GroupModel.php
index 5acf7e3f..ca15d409 100644
--- a/app/Model/GroupModel.php
+++ b/app/Model/GroupModel.php
@@ -45,10 +45,10 @@ class GroupModel extends Base
}
/**
- * Get a specific group by external id
+ * Get a specific group by externalID
*
* @access public
- * @param integer $external_id
+ * @param string $external_id
* @return array
*/
public function getByExternalId($external_id)
@@ -57,6 +57,22 @@ class GroupModel extends Base
}
/**
+ * Get specific groups by externalIDs
+ *
+ * @access public
+ * @param string[] $external_ids
+ * @return array
+ */
+ public function getByExternalIds(array $external_ids)
+ {
+ if (empty($external_ids)) {
+ return [];
+ }
+
+ return $this->db->table(self::TABLE)->in('external_id', $external_ids)->findAll();
+ }
+
+ /**
* Get all groups
*
* @access public