mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +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(
|
protected $relations = array(
|
||||||
'zone' => 'IcingaZone',
|
'zone' => 'IcingaZone',
|
||||||
'host' => 'IcingaHost',
|
'host' => 'IcingaHost',
|
||||||
|
'service' => 'IcingaService',
|
||||||
'command' => 'IcingaCommand',
|
'command' => 'IcingaCommand',
|
||||||
'period' => 'IcingaTimePeriod',
|
'period' => 'IcingaTimePeriod',
|
||||||
'service' => 'IcingaService',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// listOfRelations -> users, user_groups
|
// 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