You are here

public function SensorResult::getStatus in Monitoring 7

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

Gets sensor status.

Return value

string Sensor status.

Overrides SensorResultInterface::getStatus

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

File

lib/Drupal/monitoring/Result/SensorResult.php, line 122
Contains \Drupal\monitoring\Result\SensorResult.

Class

SensorResult
Generic container for the sensor result.

Namespace

Drupal\monitoring\Result

Code

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