Conditions | 2 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function __invoke(Request $request, string $uuid): Response |
||
33 | { |
||
34 | try { |
||
35 | $command = new DeleteSettings($uuid); |
||
36 | $this->commandBus->dispatch($command); |
||
37 | } catch (\RuntimeException $exception) { |
||
38 | $this->addFlash('errors', $exception->getMessage()); |
||
39 | |||
40 | return $this->render('Administration/Settings/index.html.twig', [ |
||
41 | 'errors' => $exception, |
||
42 | ]); |
||
43 | } |
||
44 | $this->addFlash('success', 'Settings deleted started!'); |
||
45 | |||
46 | return new RedirectResponse($this->generateUrl('admin_settings_index')); |
||
47 | } |
||
49 |