You are here

public function SensorConfig::isNumeric in Monitoring 8

Determines if the sensor value is numeric.

Return value

bool TRUE if the sensor value is numeric.

Overrides SensorConfigInterface::isNumeric

2 calls to SensorConfig::isNumeric()
SensorConfig::getDefinition in src/Entity/SensorConfig.php
Compiles sensor values to an associative array.
SensorConfig::isDefiningThresholds in src/Entity/SensorConfig.php
Checks if sensor defines thresholds.

File

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

Class

SensorConfig
Represents a sensor config entity class.

Namespace

Drupal\monitoring\Entity

Code

public function isNumeric() {
  $value_types = monitoring_value_types();
  if (empty($this->value_type)) {
    return FALSE;
  }
  return $value_types[$this->value_type]['numeric'];
}