IcingaHost(Legacy): Render alias with renderLegacyCustomExtensions

refs #12919
This commit is contained in:
Markus Frosch 2016-11-03 13:46:16 +01:00
parent df299fe314
commit 1d7cfa343e
2 changed files with 17 additions and 1 deletions

View File

@ -342,6 +342,17 @@ class IcingaHost extends IcingaObject
return c1::renderKeyValue('display_name', $this->display_name); return c1::renderKeyValue('display_name', $this->display_name);
} }
protected function renderLegacyCustomExtensions()
{
$str = parent::renderLegacyCustomExtensions();
if (($alias = $this->vars()->get('alias')) !== null) {
$str .= c1::renderKeyValue('alias', $alias->getValue());
}
return $str;
}
public static function loadWithApiKey($key, Db $db) public static function loadWithApiKey($key, Db $db)
{ {
$query = $db->getDbAdapter() $query = $db->getDbAdapter()

View File

@ -2007,6 +2007,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
return ''; return '';
} }
protected function renderLegacyCustomExtensions()
{
return '';
}
protected function renderObjectHeader() protected function renderObjectHeader()
{ {
return sprintf( return sprintf(
@ -2073,7 +2078,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
//$this->renderRelatedSets(), //$this->renderRelatedSets(),
$this->renderLegacyGroups(), $this->renderLegacyGroups(),
//$this->renderMultiRelations(), //$this->renderMultiRelations(),
//$this->renderCustomExtensions(), $this->renderLegacyCustomExtensions(),
$this->renderLegacyCustomVars(), $this->renderLegacyCustomVars(),
$this->renderLegacySuffix() $this->renderLegacySuffix()
)); ));