You are here

public function SensorResultEntity::getStatusLabel in Monitoring 8

Gets a human readable label for the sensor status.

Return value

string Sensor status label.

Overrides SensorResultDataInterface::getStatusLabel

File

src/Entity/SensorResultEntity.php, line 96
Contains \Drupal\monitoring\Entity\SensorResultEntity.

Class

SensorResultEntity
The monitoring_sensor_result entity class.

Namespace

Drupal\monitoring\Entity

Code

public function getStatusLabel() {
  $labels = SensorResult::getStatusLabels();
  return $labels[$this
    ->get('sensor_status')->value];
}