mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
Allow override of blacklisted properties
It is now a separate class attribute which can be overridden.
This commit is contained in:
parent
d311b15399
commit
5bdd219533
@ -61,6 +61,12 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||
// Will be rendered first, before imports
|
||||
protected $prioritizedProperties = array();
|
||||
|
||||
protected $propertiesNotForRendering = array(
|
||||
'id',
|
||||
'object_name',
|
||||
'object_type',
|
||||
);
|
||||
|
||||
/**
|
||||
* Array of interval property names
|
||||
*
|
||||
@ -1278,11 +1284,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||
protected function renderProperties()
|
||||
{
|
||||
$out = '';
|
||||
$blacklist = array_merge(array(
|
||||
'id',
|
||||
'object_name',
|
||||
'object_type',
|
||||
), $this->prioritizedProperties);
|
||||
$blacklist = array_merge($this->propertiesNotForRendering, $this->prioritizedProperties);
|
||||
|
||||
foreach ($this->properties as $key => $value) {
|
||||
if (in_array($key, $blacklist)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user