Db: add enumCommands to get ALL commands

This commit is contained in:
Thomas Gelf 2015-06-01 16:30:24 +02:00
parent 63a8a8d92b
commit f2b1df68c6
1 changed files with 10 additions and 0 deletions

View File

@ -38,6 +38,16 @@ class Db extends DbConnection
return $this->db()->fetchPairs($select);
}
public function enumCommands()
{
$select = $this->db()->select()->from('icinga_command', array(
'id',
'object_name',
))
->order('object_name ASC');
return $this->db()->fetchPairs($select);
}
public function enumZones()
{
$select = $this->db()->select()->from('icinga_zone', array(