mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 14:24:41 +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
|
||||
*
|
||||
* Unknown properties (no matching setter) are considered as element attributes.
|
||||
*
|
||||
* @param array $properties
|
||||
*
|
||||
* @return $this
|
||||
@ -537,6 +539,8 @@ class NavigationItem implements IteratorAggregate
|
||||
$setter = 'set' . ucfirst($name);
|
||||
if (method_exists($this, $setter)) {
|
||||
$this->$setter($value);
|
||||
} else {
|
||||
$this->setAttribute($name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user