public function SensorConfig::getThresholdValue in Monitoring 8
Gets the configured threshold value.
Parameters
string $key: Name of the threshold, for example warning or critical.
Return value
int|null The threshold value or NULL if not configured.
Overrides SensorConfigInterface::getThresholdValue
File
- src/
Entity/ SensorConfig.php, line 247 - Contains \Drupal\monitoring\Entity\SensorConfig.
Class
- SensorConfig
- Represents a sensor config entity class.
Namespace
Drupal\monitoring\EntityCode
public function getThresholdValue($key) {
if (isset($this->thresholds[$key]) && $this->thresholds[$key] !== '') {
return $this->thresholds[$key];
}
}