You are here

public function SensorConfig::isDefiningThresholds in Monitoring 8

Checks if sensor defines thresholds.

Return value

bool

Overrides SensorConfigInterface::isDefiningThresholds

1 call to SensorConfig::isDefiningThresholds()
SensorConfig::getDefinition in src/Entity/SensorConfig.php
Compiles sensor values to an associative array.

File

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

Class

SensorConfig
Represents a sensor config entity class.

Namespace

Drupal\monitoring\Entity

Code

public function isDefiningThresholds() {
  return $this
    ->isNumeric() && $this
    ->getThresholdsType() != 'none';
}