Add choice functionality to Icinga\Form\SendCommand

This commit is contained in:
Johannes Meyer 2013-07-08 16:35:28 +02:00 committed by Marius Hein
parent 101a1f093f
commit 087e4dfe90
1 changed files with 14 additions and 0 deletions

View File

@ -111,6 +111,20 @@ class SendCommand extends Builder
{ {
return $this->getValue($id); return $this->getValue($id);
} }
public function addChoice($id, $label, $values)
{
$this->addElement("select", $id, array(
'label' => $label
)
);
$this->getElement($id)->setMultiOptions($values);
}
public function getChoice($id)
{
return $this->getElement($id)->options[$_POST[$id]];
}
} }
?> ?>