private readonly SystemConfigService
$systemConfigService ) { } public function load( Request
$request,
SalesChannelContext
$context,
CustomerEntity
$customer ): NewsletterAccountPagelet
{ $newsletterAccountPagelet =
$this->
getBasePagelet($customer,
$context->
getSalesChannelId());
$newsletterAccountPagelet->
setNewsletterStatus( $this->
getNewsletterRecipientStatus($request,
$customer,
$context) );
if ($newsletterAccountPagelet->
getNewsletterStatus() === NewsletterSubscribeRoute::STATUS_NOT_SET
) { $text =
$this->translator->
trans('newsletter.subscriptionPersistedInfo'
);
$newsletterAccountPagelet->
addMessages( [ [ 'type' => 'info',
'text' =>
$text,
],
]