You are here

public function SensorResult::getStatus in Monitoring 8

Same name and namespace in other branches
  1. 7 lib/Drupal/monitoring/Result/SensorResult.php \Drupal\monitoring\Result\SensorResult::getStatus()

Gets sensor status.

Return value

string Sensor status.

Overrides SensorResultDataInterface::getStatus

5 calls to SensorResult::getStatus()
SensorResult::isCritical in src/Result/SensorResult.php
Checks if sensor is in CRITICAL state.
SensorResult::isOk in src/Result/SensorResult.php
Checks if sensor is in OK state.
SensorResult::isUnknown in src/Result/SensorResult.php
Checks if sensor is in UNKNOWN state.
SensorResult::isWarning in src/Result/SensorResult.php
Checks if sensor is in WARNING state.
SensorResult::toArray in src/Result/SensorResult.php
Returns sensor result data as array.

File

src/Result/SensorResult.php, line 127

Class

SensorResult
Generic container for the sensor result.

Namespace

Drupal\monitoring\Result

Code

public function getStatus() {
  return $this
    ->getResultData('sensor_status');
}