mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
parent
bde3830369
commit
c9ef9fe91a
@ -58,18 +58,27 @@ class IcingaCommand extends IcingaObject
|
|||||||
|
|
||||||
protected function renderObjectHeader()
|
protected function renderObjectHeader()
|
||||||
{
|
{
|
||||||
if ($this->getResolvedProperty('methods_execute') === 'PluginNotification') {
|
$execute = $this->getResolvedProperty('methods_execute');
|
||||||
return sprintf(
|
|
||||||
"%s %s %s {\n",
|
if ($execute === 'PluginNotification') {
|
||||||
$this->getObjectTypeName(),
|
return $this->renderObjectHeaderWithType('NotificationCommand');
|
||||||
'NotificationCommand',
|
} elseif ($execute === 'PluginEvent') {
|
||||||
c::renderString($this->getObjectName())
|
return $this->renderObjectHeaderWithType('EventCommand');
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
return parent::renderObjectHeader();
|
return parent::renderObjectHeader();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function renderObjectHeaderWithType($type)
|
||||||
|
{
|
||||||
|
return sprintf(
|
||||||
|
"%s %s %s {\n",
|
||||||
|
$this->getObjectTypeName(),
|
||||||
|
$type,
|
||||||
|
c::renderString($this->getObjectName())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function mungeCommand($value)
|
public function mungeCommand($value)
|
||||||
{
|
{
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user