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…
Reference in New Issue