diff --git a/library/Director/Db.php b/library/Director/Db.php index 7b61f279..ba79ed4b 100644 --- a/library/Director/Db.php +++ b/library/Director/Db.php @@ -65,4 +65,13 @@ class Db extends DbConnection ))->where('object_type', 'object')->order('object_name ASC'); return $this->db()->fetchPairs($select); } + + public function enumHostgroups() + { + $select = $this->db()->select()->from('icinga_hostgroup', array( + 'id', + 'object_name', + ))->where('object_type', 'object')->order('object_name ASC'); + return $this->db()->fetchPairs($select); + } }