diff --git a/library/Director/Objects/IcingaCommand.php b/library/Director/Objects/IcingaCommand.php index f2206264..9ba9a6db 100644 --- a/library/Director/Objects/IcingaCommand.php +++ b/library/Director/Objects/IcingaCommand.php @@ -56,6 +56,20 @@ class IcingaCommand extends IcingaObject return c::renderKeyValue('execute', $this->methods_execute); } + protected function renderObjectHeader() + { + if ($this->getResolvedProperty('methods_execute') === 'PluginNotification') { + return sprintf( + "%s %s %s {\n", + $this->getObjectTypeName(), + 'NotificationCommand', + c::renderString($this->getObjectName()) + ); + } else { + return parent::renderObjectHeader(); + } + } + public function mungeCommand($value) { if (is_array($value)) {