mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-03 20:14:24 +02:00
IcingaObject: allow default for getResolvedProperty
This commit is contained in:
parent
7d9fefd61f
commit
f9f1298bfd
@ -355,14 +355,14 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResolvedProperty($key)
|
public function getResolvedProperty($key, $default = null)
|
||||||
{
|
{
|
||||||
$properties = $this->getResolvedProperties();
|
$properties = $this->getResolvedProperties();
|
||||||
if (property_exists($properties, $key)) {
|
if (property_exists($properties, $key)) {
|
||||||
return $properties->$key;
|
return $properties->$key;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResolvedProperties()
|
public function getResolvedProperties()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user