[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaObject(Legacy): Add getLegacyObjectType function

git at icinga.org git at icinga.org
Thu Nov 3 14:23:22 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: a2151fd9d17031cf8739f6a1f474963632180897
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=a2151fd9d17031cf8739f6a1f474963632180897

Author: Markus Frosch <markus.frosch at icinga.com>
Date:   Fri Oct 14 10:07:17 2016 +0200

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 a0795bc..390f38d 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(



More information about the icinga-checkins mailing list