/** * (non-PHPDoc) * @see \Icinga\Web\Form::onSuccess() For the method documentation. */ public function onSuccess() { foreach ($this->objects as $object) { /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */ $ack = new AcknowledgeProblemCommand(); $ack->setObject($object)->setComment($this->getElement('comment')->getValue())->setAuthor($this->request->getUser()->getUsername())->setPersistent($this->getElement('persistent')->isChecked())->setSticky($this->getElement('sticky')->isChecked())->setNotify($this->getElement('notify')->isChecked()); if ($this->getElement('expire')->isChecked()) { $ack->setExpireTime($this->getElement('expire_time')->getValue()->getTimestamp()); } $this->getTransport($this->request)->send($ack); } Notification::success($this->translatePlural('Acknowledging problem..', 'Acknowledging problems..', count($this->objects))); return true; }