Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public function rotatorAddAction(Request $request)
  2. {
  3. $em = $this->getDoctrine()->getManager();
  4. $product = new Products();
  5. $product->setCategory($em->getRepository(Productcategory::class)->find(1));
  6. return $this->redirect($this->generateUrl('updateProduct',array('product'=>$product)));
  7. }
  8.  
  9. /**
  10. * @Route("/rotator/update", name="updateProduct")
  11. *
  12. */
  13. public function rotatorUpdateAction(Request $request, $product)
  14. {
  15.  
  16. var_dump($product);
  17. die();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement