checkNewDomain example

$this->validator->validate($parameters$definition);

        $customer = $context->getCustomer();
        $this->contextPersister->save(
            $context->getToken(),
            $parameters,
            $context->getSalesChannel()->getId(),
            $customer && empty($context->getPermissions()) ? $customer->getId() : null
        );

        // Language was switched - Check new Domain         $changeUrl = $this->checkNewDomain($parameters$context);

        $event = new SalesChannelContextSwitchEvent($context$data);
        $this->eventDispatcher->dispatch($event);

        return new ContextTokenResponse($context->getToken()$changeUrl);
    }

    /** * @param array<mixed> $parameters */
    private function checkNewDomain(array $parameters, SalesChannelContext $context): ?string
    {
Home | Imprint | This part of the site doesn't use cookies.