mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
NavigationItem: Consider unknown properties as element attributes
refs #5600
This commit is contained in:
parent
ca72bd5455
commit
f9b68b683b
@ -527,6 +527,8 @@ class NavigationItem implements IteratorAggregate
|
|||||||
/**
|
/**
|
||||||
* Set this item's properties
|
* Set this item's properties
|
||||||
*
|
*
|
||||||
|
* Unknown properties (no matching setter) are considered as element attributes.
|
||||||
|
*
|
||||||
* @param array $properties
|
* @param array $properties
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
@ -537,6 +539,8 @@ class NavigationItem implements IteratorAggregate
|
|||||||
$setter = 'set' . ucfirst($name);
|
$setter = 'set' . ucfirst($name);
|
||||||
if (method_exists($this, $setter)) {
|
if (method_exists($this, $setter)) {
|
||||||
$this->$setter($value);
|
$this->$setter($value);
|
||||||
|
} else {
|
||||||
|
$this->setAttribute($name, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user