public function SensorInfo::getThresholdsType in Monitoring 7
Gets threshold type.
Return value
string|null Threshold type.
File
- lib/
Drupal/ monitoring/ Sensor/ SensorInfo.php, line 172 - Contains \Drupal\monitoring\Sensor\SensorInfo.
Class
- SensorInfo
- Represents a sensor info as defined in hook_monitoring_sensor_info().
Namespace
Drupal\monitoring\SensorCode
public function getThresholdsType() {
$thresholds = $this
->getSetting('thresholds');
if (!empty($thresholds['type'])) {
return $thresholds['type'];
}
// We assume the default threshold type.
return 'exceeds';
}