From a2151fd9d17031cf8739f6a1f474963632180897 Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Fri, 14 Oct 2016 10:07:17 +0200 Subject: [PATCH] IcingaObject(Legacy): Add getLegacyObjectType function So the type rendered to the object header can get overwritten. refs #12919 --- library/Director/Objects/IcingaObject.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php index a0795bc3..390f38dc 100644 --- a/library/Director/Objects/IcingaObject.php +++ b/library/Director/Objects/IcingaObject.php @@ -1955,9 +1955,14 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer ); } + protected function getLegacyObjectType() + { + return strtolower($this->getType()); + } + protected function renderLegacyObjectHeader() { - $type = strtolower($this->getType()); + $type = $this->getLegacyObjectType(); if ($this->isTemplate()) { $name = c1::renderKeyValue(