You are here

public function SensorInfo::getSetting in Monitoring 7

Gets setting.

Parameters

string $key: Setting key.

mixed $default: Default value if the setting does not exist.

Return value

mixed Setting value.

7 calls to SensorInfo::getSetting()
SensorInfo::getCachingTime in lib/Drupal/monitoring/Sensor/SensorInfo.php
Gets sensor caching time.
SensorInfo::getCategory in lib/Drupal/monitoring/Sensor/SensorInfo.php
Gets sensor categories.
SensorInfo::getThresholdsType in lib/Drupal/monitoring/Sensor/SensorInfo.php
Gets threshold type.
SensorInfo::getThresholdValue in lib/Drupal/monitoring/Sensor/SensorInfo.php
Returns a given threshold if one is configured.
SensorInfo::getTimeIntervalValue in lib/Drupal/monitoring/Sensor/SensorInfo.php
Gets time interval value.

... See full list

File

lib/Drupal/monitoring/Sensor/SensorInfo.php, line 230
Contains \Drupal\monitoring\Sensor\SensorInfo.

Class

SensorInfo
Represents a sensor info as defined in hook_monitoring_sensor_info().

Namespace

Drupal\monitoring\Sensor

Code

public function getSetting($key, $default = NULL) {
  return isset($this->sensorInfo['settings'][$key]) ? $this->sensorInfo['settings'][$key] : $default;
}