| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function deleteAction($zoneId, $componentId, Request $request) |
||
| 25 | { |
||
| 26 | if (!$zone = $this->container->get('synapse.zone.loader')->retrieve($zoneId)) { |
||
| 27 | throw new NotFoundHttpException(sprintf('No zone found under id "%s"', $zoneId)); |
||
| 28 | } |
||
| 29 | if (!$component = $this->container->get('synapse.component.loader')->retrieve($componentId)) { |
||
| 30 | throw new NotFoundHttpException(sprintf('No component found under id "%s"', $componentId)); |
||
| 31 | } |
||
| 32 | |||
| 33 | $this->container->get('synapse.zone.domain')->removeComponent( |
||
| 34 | $zone, |
||
| 35 | $component |
||
| 36 | ); |
||
| 37 | |||
| 38 | return new RedirectResponse( |
||
| 39 | $request->server->get('HTTP_REFERER') |
||
| 40 | ); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |