/**
  * {@inheritdoc}
  */
 public function onSuccess()
 {
     $cmd = new DeleteDowntimeCommand();
     $cmd->setDowntimeId($this->getElement('downtime_id')->getValue())->setDowntimeName($this->getElement('downtime_name')->getValue())->setIsService($this->getElement('downtime_is_service')->getValue());
     $this->getTransport($this->request)->send($cmd);
     $redirect = $this->getElement('redirect')->getValue();
     if (!empty($redirect)) {
         $this->setRedirectUrl($redirect);
     }
     Notification::success($this->translate('Deleting downtime.'));
     return true;
 }
 /**
  * {@inheritdoc}
  */
 public function onSuccess()
 {
     foreach ($this->downtimes as $downtime) {
         $delDowntime = new DeleteDowntimeCommand();
         $delDowntime->setDowntimeId($downtime->id)->setIsService(isset($downtime->service_description));
         $this->getTransport($this->request)->send($delDowntime);
     }
     $redirect = $this->getElement('redirect')->getValue();
     if (!empty($redirect)) {
         $this->setRedirectUrl($redirect);
     }
     Notification::success($this->translatePlural('Deleting downtime..', 'Deleting downtimes..', count($this->downtimes)));
     return true;
 }