From ab8c8b041d1e762c002211453e5dd42d3f3b0eff Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 27 Sep 2019 15:09:00 +0200 Subject: [PATCH] IcingaNotification: render host_id as host_name Does not affect apply rules, just those who enforce host_id via sync --- library/Director/Objects/IcingaNotification.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/library/Director/Objects/IcingaNotification.php b/library/Director/Objects/IcingaNotification.php index 8f3bead9..13d5ce99 100644 --- a/library/Director/Objects/IcingaNotification.php +++ b/library/Director/Objects/IcingaNotification.php @@ -230,6 +230,20 @@ class IcingaNotification extends IcingaObject implements ExportInterface } } + /** + * Render host_id as host_name + * + * Avoid complaints for method names with underscore: + * @codingStandardsIgnoreStart + * + * @return string + */ + public function renderHost_id() + { + // @codingStandardsIgnoreEnd + return $this->renderRelationProperty('host', $this->get('host_id'), 'host_name'); + } + protected function setKey($key) { if (is_int($key)) {