parent
0349a1042a
commit
c119c47864
|
@ -2945,6 +2945,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
}
|
||||
}
|
||||
|
||||
public function listFlatResolvedImportNames()
|
||||
{
|
||||
return $this->templateTree()->getAncestorsFor($this);
|
||||
}
|
||||
|
||||
public function listImportIds()
|
||||
{
|
||||
return $this->templateTree()->listParentIdsFor($this);
|
||||
|
|
|
@ -212,9 +212,8 @@ abstract class ObjectApplyMatches
|
|||
$this->object = $object;
|
||||
$this->flatObject = $object->toPlainObject(true, false);
|
||||
// Sure, we are flat - but we might still want to match templates.
|
||||
// TODO: Flatten the whole tree
|
||||
unset($this->flatObject->imports);
|
||||
$this->flatObject->templates = $object->imports()->listImportNames();
|
||||
$this->flatObject->templates = $object->listFlatResolvedImportNames();
|
||||
static::flattenVars($this->flatObject);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue