/** * Remove a navigation element * * @param NavigationElementInterface $element */ public function removeNavigationElement(NavigationElementInterface $element) { foreach ($this->elements as $k => $existingElement) { if ($element == $existingElement) { unset($this->elements[$k]); $this->breadcrumbs->removeElement($element); $this->pageTitle->removeElement($element); break; } } }
/** * Add an element to the Breadcrumbs and the Page Title * * @param NavigationElementInterface $element The element to push in the navigation stack * * @throws \Exception */ public function addNavigationElement(NavigationElementInterface $element) { $this->breadcrumbs->addElement($element); $this->pageTitle->addElement($element); $this->element = $element; }