mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
parent
a4c2081f64
commit
29413360d9
@ -269,6 +269,24 @@ class Navigation implements ArrayAccess, Countable, IteratorAggregate
|
|||||||
return new RecursiveNavigationRenderer($this);
|
return new RecursiveNavigationRenderer($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Merge this navigation with the given one
|
||||||
|
*
|
||||||
|
* Any duplicate items of this navigation will be overwritten by the given navigation's items.
|
||||||
|
*
|
||||||
|
* @param Navigation $navigation
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function merge(Navigation $navigation)
|
||||||
|
{
|
||||||
|
foreach ($navigation as $item) {
|
||||||
|
$this->addItem($item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create and return a new set of navigation items for the given configuration
|
* Create and return a new set of navigation items for the given configuration
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user