mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 16:24:05 +02:00
IcingaNotification: fix loading for apply objects
This commit is contained in:
parent
1d243e0aaf
commit
47ef93cf91
@ -37,10 +37,27 @@ class IcingaNotification extends IcingaObject
|
||||
protected $relations = array(
|
||||
'zone' => 'IcingaZone',
|
||||
'host' => 'IcingaHost',
|
||||
'service' => 'IcingaService',
|
||||
'command' => 'IcingaCommand',
|
||||
'period' => 'IcingaTimePeriod',
|
||||
'service' => 'IcingaService',
|
||||
);
|
||||
|
||||
// listOfRelations -> users, user_groups
|
||||
|
||||
protected function setKey($key)
|
||||
{
|
||||
if (is_int($key)) {
|
||||
$this->id = $key;
|
||||
} elseif (is_array($key)) {
|
||||
foreach (array('id', 'host_id', 'service_id', 'object_name') as $k) {
|
||||
if (array_key_exists($k, $key)) {
|
||||
$this->set($k, $key[$k]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return parent::setKey($key);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user