mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 00:34:05 +02:00
ExtensibleSetElement: failsafe rendering
This commit is contained in:
parent
685e42d325
commit
5b61b76076
@ -305,17 +305,29 @@ class ExtensibleSetElement extends BaseHtmlElement
|
||||
if ($this->inheritedFrom === null) {
|
||||
return \sprintf(
|
||||
$this->translate('%s (inherited)'),
|
||||
\implode(', ', $this->inherited)
|
||||
$this->stringifyInheritedValue()
|
||||
);
|
||||
} else {
|
||||
return \sprintf(
|
||||
$this->translate('%s (inherited from %s)'),
|
||||
\implode(', ', $this->inherited),
|
||||
$this->stringifyInheritedValue(),
|
||||
$this->inheritedFrom
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function stringifyInheritedValue()
|
||||
{
|
||||
if (\is_array($this->inherited)) {
|
||||
return \implode(', ', $this->inherited);
|
||||
} else {
|
||||
return \sprintf(
|
||||
$this->translate('%s (not an Array!)'),
|
||||
\var_export($this->inherited, 1)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function createAddNewButton()
|
||||
{
|
||||
return $this->newInlineButtons(
|
||||
|
Loading…
x
Reference in New Issue
Block a user