Db: add enumHostgroups

This commit is contained in:
Alexander Fuhr 2015-06-02 17:29:07 +02:00
parent 43982b6c3a
commit a130f92d37
1 changed files with 9 additions and 0 deletions

View File

@ -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);
}
}