/** * update. * * @param Service $service * @param Incident $incident * * @return Service */ public function update(Service $service, Incident $incident) { if ($incident->getStatus() != Incident::RESOLVED) { $service->setStatus(Service::OUTAGE); } else { $service->setStatus(Service::OPERATIONNAL); } return $service; }
/** * Get a css class for an event status. * * @param Incident $incident * * @return string */ public function getIncidentStatusCss(Incident $incident) { switch ($incident->getStatus()) { case Incident::RESOLVED: return 'fa-check textgreen'; case Incident::IDENTIFIED: case Incident::MONITORING: return 'fa-bolt textorange'; case Incident::INVESTIGATING: return 'fa-times textred'; default: return ''; } }