mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
parent
0788041c43
commit
997b57834c
@ -320,5 +320,22 @@ class Navigation implements ArrayAccess, Countable, IteratorAggregate
|
|||||||
{
|
{
|
||||||
return new RecursiveNavigationRenderer($this);
|
return new RecursiveNavigationRenderer($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create and return a new set of navigation items for the given array
|
||||||
|
*
|
||||||
|
* @param array $array
|
||||||
|
*
|
||||||
|
* @return Navigation
|
||||||
|
*/
|
||||||
|
public static function fromArray(array $array)
|
||||||
|
{
|
||||||
|
$navigation = new static();
|
||||||
|
foreach ($array as $name => $properties) {
|
||||||
|
$navigation->addItem($name, $properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $navigation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user