Esempio n. 1
0
 protected function saveMenuItem(Model\CMS\Entity\Menu $menuItem, Form $form)
 {
     $menuItem->setTranslatableLocale($this->getEditControl()->getLocale());
     $this->menuService->getRepository()->persistAsLastChildOf($menuItem, $this->parentMenu);
     $this->menuService->flush();
     $this->flashMessage('common.alert.newEntrySaved', 'success');
     $this->getEditControl()->go('this', ['selectItem' => $menuItem->id]);
 }
Esempio n. 2
0
 protected function saveMenuItem(Model\CMS\Entity\Menu $menuItem, Form $form)
 {
     $menuItem->setTranslatableLocale($this->getEditControl()->getLocale());
     $this->menuService->persist($menuItem);
     $this->menuService->flush();
     $this->flashMessage('common.alert.changesSaved', 'success');
     $this->getEditControl()->go('this', ['selectItem' => $menuItem->id]);
 }