Guest User

Untitled

a guest
Oct 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. if ($form->isValid()) {
  2. $id || $em->persist($category);
  3. $em->flush();
  4. $em->commit();
  5.  
  6. $this->get('session')->setFlash('notice', $this->trans('changes.saved'));
  7.  
  8. $url = $id ?
  9. $request->getUri() :
  10. $this->generateUrl('blog_admin_category_edit', array(
  11. 'id' => $category->getId()
  12. ));
  13.  
  14. return $this->redirect($url);
  15. }
Add Comment
Please, Sign In to add comment