Guest User

Untitled

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