/**
  * {@inheritdoc}
  */
 public function onSuccess()
 {
     foreach ($this->objects as $object) {
         /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
         $notification = new SendCustomNotificationCommand();
         $notification->setObject($object)->setComment($this->getElement('comment')->getValue())->setAuthor($this->request->getUser()->getUsername())->setForced($this->getElement('forced')->isChecked());
         if (($broadcast = $this->getElement('broadcast')) !== null) {
             $notification->setBroadcast($broadcast->isChecked());
         }
         $this->getTransport($this->request)->send($notification);
     }
     Notification::success($this->translatePlural('Sending custom notification..', 'Sending custom notifications..', count($this->objects)));
     return true;
 }