public function removeAction()
 {
     if (!$this->getRequest()->isPost()) {
         return $this->fail('downtime/remove requires a POST request');
     }
     $hostname = $this->params->get('host');
     $comment = $this->params->get('comment');
     if (!$hostname) {
         return $this->fail('Parameter "host" is required');
     }
     if (!$comment) {
         return $this->fail('Parameter "comment" is required');
     }
     $columns = array('host' => 'host_name', 'service' => 'service_description', 'objecttype' => 'downtime_objecttype', 'internal_id' => 'downtime_internal_id');
     $downtimes = $this->backend()->select()->from('downtime', $columns)->where('host_name', $hostname)->where('downtime_comment', $comment)->getQuery()->fetchAll();
     foreach ($downtimes as $downtime) {
         if ($downtime->objecttype === 'service') {
             $object = $this->getServiceObject($downtime->host, $downtime->service);
         } else {
             $object = $this->getHostObject($downtime->host);
         }
         $cmd = new DeleteDowntimeCommand();
         $cmd->setObject($object)->setDowntimeId($downtime->internal_id);
         $this->getTransport()->send($cmd);
     }
     $this->view->cnt_removed = count($downtimes);
     $this->view->removed_downtimes = $downtimes;
     if ($this->isJson) {
         $this->render('remove-json');
     }
 }