mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
ImportSource: add failsafe getSetting() method
This commit is contained in:
parent
a7f11f7702
commit
0b052bb05a
@ -52,6 +52,15 @@ class ImportSource extends DbObject
|
|||||||
return $this->settings;
|
return $this->settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSetting($name, $default = null)
|
||||||
|
{
|
||||||
|
if (array_key_exists($name, $this->settings)) {
|
||||||
|
return $this->settings[$name];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
|
||||||
protected function onStore()
|
protected function onStore()
|
||||||
{
|
{
|
||||||
$old = $this->fetchSettingsFromDb();
|
$old = $this->fetchSettingsFromDb();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user