Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getAccountNewsletterRecipient example
string
{
$criteria
=
new
Criteria
(
)
;
$apiRequest
=
new
Request
(
)
;
$event
=
new
AccountNewsletterRecipientRouteRequestEvent
(
$request
,
$apiRequest
,
$context
,
$criteria
)
;
$this
->eventDispatcher->
dispatch
(
$event
)
;
$responseStruct
=
$this
->newsletterRecipientRoute
->
load
(
$event
->
getStoreApiRequest
(
)
,
$context
,
$criteria
,
$customer
)
;
$status
= 'undefined';
if
(
$responseStruct
->
getAccountNewsletterRecipient
(
)
->
getStatus
(
)
)
{
$status
=
$responseStruct
->
getAccountNewsletterRecipient
(
)
->
getStatus
(
)
;
}
return
$status
;
}
protected
function
getBasePagelet
(
CustomerEntity
$customer
, string
$salesChannelId
)
: NewsletterAccountPagelet
{
$newsletterAccountPagelet
=
new
NewsletterAccountPagelet
(
)
;
$newsletterAccountPagelet
->
setCustomer
(
$customer
)
;
$newsletterAccountPagelet
->
setNewsletterDoi
(