| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | class UtilityController extends Controller |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Cart page |
||
| 21 | * |
||
| 22 | * @Route("/remove_item/{product}", name="remove_item_from_cart") |
||
| 23 | */ |
||
| 24 | public function removeItemFromCart(SkuskuCartProduct $product) |
||
| 25 | { |
||
| 26 | $em = $this->getDoctrine()->getManager(); |
||
| 27 | $em->remove($product); |
||
| 28 | $em->flush(); |
||
| 29 | |||
| 30 | return new Response('ok'); |
||
| 31 | } |
||
| 32 | /** |
||
| 33 | * Cart page |
||
| 34 | * |
||
| 35 | * @Route("/update_item/{product}", name="update_item_in_cart", methods={"POST"}) |
||
| 36 | */ |
||
| 37 | public function updateItemInCart(Request $request, SkuskuCartProduct $product) |
||
| 44 | } |
||
| 45 | } |