mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-05 13:04:28 +02:00
DataTypeHook: also add getSetting helper method
This commit is contained in:
parent
d7da41b789
commit
f23c074143
@ -40,4 +40,13 @@ abstract class DataTypeHook
|
||||
$this->settings = $settings;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSetting($name, $default = null)
|
||||
{
|
||||
if (array_key_exists($name, $this->settings)) {
|
||||
return $this->settings[$name];
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user