private readonly AbstractContextSwitchRoute
$contextSwitchRoute,
private readonly RequestStack
$requestStack,
private readonly RouterInterface
$router ) { } #[Route(path: '/checkout/configure', name: 'frontend.checkout.configure', options: ['seo' => false], defaults: ['XmlHttpRequest' => true], methods: ['POST'])]
public function configure(Request
$request, RequestDataBag
$data, SalesChannelContext
$context): Response
{ $this->contextSwitchRoute->
switchContext($data,
$context);
return $this->
createActionResponse($request);
} #[Route(path: '/checkout/language', name: 'frontend.checkout.switch-language', methods: ['POST'])]
public function switchLanguage(Request
$request, SalesChannelContext
$context): RedirectResponse
{ $languageId =
$request->request->
get('languageId'
);
if (!
$languageId || !\
is_string($languageId)) { throw RoutingException::
missingRequestParameter('languageId'
);
} try {