Db: add enumDatalist helper method

This commit is contained in:
Thomas Gelf 2015-07-28 11:49:30 +02:00
parent fa8dbaadfc
commit d52549acd7
1 changed files with 9 additions and 0 deletions

View File

@ -289,6 +289,15 @@ class Db extends DbConnection
return $this->db()->fetchPairs($select); return $this->db()->fetchPairs($select);
} }
public function enumDatalist()
{
$select = $this->db()->select()->from('director_datalist', array(
'id',
'list_name',
))->order('list_name ASC');
return $this->db()->fetchPairs($select);
}
public function enumUsergroups() public function enumUsergroups()
{ {
$select = $this->db()->select()->from('icinga_usergroup', array( $select = $this->db()->select()->from('icinga_usergroup', array(