getOrCreateBookingCreateDto($this->bookingService, $request); if ($result instanceof Response) { return $result; } $bookingCreateDto = $result; // Validate step access if ($redirect = $this->validateStepAccess($bookingCreateDto, 4)) { return $redirect; } $form = $this->createForm(BookingCreateStep4Type::class, $bookingCreateDto); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { // TODO: Perform inquiry API call // TODO: If inquiry successful, perform booking API call // TODO: Clear session and redirect to success page $this->addFlash('success', 'Buchung erfolgreich abgeschlossen.'); return $this->redirectToRoute('app_booking_create_step_4'); } return $this->render('booking/create_step_4.html.twig', [ 'bookingCreateDto' => $bookingCreateDto, 'form' => $form->createView(), ...$this->getSummaryVariables($bookingCreateDto), ]); } }