| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function deletePriceCategoriesAction() |
||
| 27 | { |
||
| 28 | $performanceEventId = $this->get('request')->query->get('performanceEvent_id'); |
||
| 29 | $em = $this->getDoctrine()->getManager(); |
||
| 30 | $performanceEvent = $em->getRepository('AppBundle:PerformanceEvent')->find($performanceEventId); |
||
| 31 | foreach ($performanceEvent->getPriceCategories() as $priceCategory) { |
||
| 32 | $performanceEvent->removePriceCategories($priceCategory); |
||
| 33 | $em->remove($priceCategory); |
||
| 34 | $em->flush(); |
||
| 35 | } |
||
| 36 | return new Response(); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |