throw new \
Exception($throwable->
getMessage(),
$throwable->
getCode(),
$throwable);
} $page =
$this->newsletterConfirmRegisterPageLoader->
load($request,
$context);
return $this->
renderStorefront('@Storefront/storefront/page/newsletter/confirm-subscribe.html.twig',
['page' =>
$page]);
} #[Route(path: '/widgets/account/newsletter', name: 'frontend.account.newsletter', defaults: ['XmlHttpRequest' => true, '_loginRequired' => true], methods: ['POST'])]
public function subscribeCustomer(Request
$request, RequestDataBag
$dataBag, SalesChannelContext
$context, CustomerEntity
$customer): Response
{ $pagelet =
$this->newsletterAccountPageletLoader->
action($request,
$dataBag,
$context,
$customer);
return $this->
renderStorefront('@Storefront/storefront/page/account/newsletter.html.twig',
[ 'newsletterAccountPagelet' =>
$pagelet,
]);
}}