public function removePageAction() { $page = $this->navigationManager->getPage($this->params('page')); $this->assertGranted('navigation.manage', $page); $this->navigationManager->removePage($page->getId()); $this->navigationManager->flush(); $this->flashMessenger()->addSuccessMessage('The page was successfully removed'); return $this->redirect()->toReferer(); }