You are here

public function SensorConfig::getThresholdsType in Monitoring 8

Gets configured threshold type.

Defaults to none.

Return value

string|null Threshold type.

Overrides SensorConfigInterface::getThresholdsType

1 call to SensorConfig::getThresholdsType()
SensorConfig::isDefiningThresholds in src/Entity/SensorConfig.php
Checks if sensor defines thresholds.

File

src/Entity/SensorConfig.php, line 236
Contains \Drupal\monitoring\Entity\SensorConfig.

Class

SensorConfig
Represents a sensor config entity class.

Namespace

Drupal\monitoring\Entity

Code

public function getThresholdsType() {
  if (!empty($this->thresholds['type'])) {
    return $this->thresholds['type'];
  }
  return 'none';
}