You are here

public function SensorConfig::getSetting in Monitoring 8

Gets the setting of a key.

Parameters

string $key: Setting key.

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

Return value

mixed Setting value.

Overrides SensorConfigInterface::getSetting

1 call to SensorConfig::getSetting()
SensorConfig::getTimeIntervalValue in src/Entity/SensorConfig.php
Gets the time interval value.

File

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

Class

SensorConfig
Represents a sensor config entity class.

Namespace

Drupal\monitoring\Entity

Code

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