diff --git a/library/Director/Objects/IcingaObjectMultiRelations.php b/library/Director/Objects/IcingaObjectMultiRelations.php index 5413d75a..0d0a1a54 100644 --- a/library/Director/Objects/IcingaObjectMultiRelations.php +++ b/library/Director/Objects/IcingaObjectMultiRelations.php @@ -8,6 +8,7 @@ use Iterator; use Countable; use Icinga\Module\Director\IcingaConfig\IcingaConfigRenderer; use Icinga\Module\Director\IcingaConfig\IcingaConfigHelper as c; +use Icinga\Module\Director\IcingaConfig\IcingaLegacyConfigHelper as c1; class IcingaObjectMultiRelations implements Iterator, Countable, IcingaConfigRenderer { @@ -414,4 +415,15 @@ class IcingaObjectMultiRelations implements Iterator, Countable, IcingaConfigRen } } } + + public function toLegacyConfigString() + { + $relations = array_keys($this->relations); + + if (empty($relations)) { + return ''; + } + + return c1::renderKeyValue($this->propertyName, c1::renderArray($relations)); + } }