/**
  * Schedule host downtimes
  */
 public function scheduleHostDowntimeAction()
 {
     $filter = $this->getFilterOrExitIfEmpty();
     $hostList = new HostList($this->backend);
     $hostList->applyFilter($this->getRestriction('monitoring/filter/objects'))->applyFilter($filter);
     if (!$hostList->count()) {
         $this->getResponse()->json()->setFailData(array('filter' => 'No hosts found matching the filter'))->sendResponse();
     }
     $form = new ScheduleHostDowntimeCommandForm();
     $form->setIsApiTarget(true)->setBackend($this->backend)->setObjects($hostList->fetch())->handleRequest($this->getRequest());
 }