mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
IcingaObject: new helper method for single...
...resolved custom vars
This commit is contained in:
parent
32790dbedc
commit
fc2890d865
@ -832,6 +832,21 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||
}
|
||||
}
|
||||
|
||||
public function getResolvedVar($varname)
|
||||
{
|
||||
try {
|
||||
$vars = $this->getResolvedVars();
|
||||
} catch (NestingError $e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (property_exists($vars, $varname)) {
|
||||
return $vars->$varname;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function getOriginForVar($varname)
|
||||
{
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user