mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
parent
d5131f7fac
commit
2725ef54e6
@ -73,4 +73,26 @@ class IcingaCommandForm extends DirectorObjectForm
|
|||||||
|
|
||||||
$this->setButtons();
|
$this->setButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function enumAllowedTemplates()
|
||||||
|
{
|
||||||
|
$object = $this->object();
|
||||||
|
$tpl = $this->db->enum($object->getTableName());
|
||||||
|
if (empty($tpl)) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$id = $object->get('id');
|
||||||
|
|
||||||
|
if (array_key_exists($id, $tpl)) {
|
||||||
|
unset($tpl[$id]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($tpl)) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl = array_combine($tpl, $tpl);
|
||||||
|
return $tpl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user