Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setNewestOrder example
$page
=
$this
->genericLoader->
load
(
$request
,
$salesChannelContext
)
;
$page
= AccountOverviewPage::
createFrom
(
$page
)
;
$page
->
setCustomer
(
$this
->
loadCustomer
(
$salesChannelContext
,
$customer
)
)
;
$page
->
getMetaInformation
(
)
?->
setRobots
(
'noindex,follow'
)
;
$order
=
$this
->
loadNewestOrder
(
$salesChannelContext
,
$request
)
;
if
(
$order
!== null
)
{
$page
->
setNewestOrder
(
$order
)
;
}
$newslAccountPagelet
=
$this
->newsletterAccountPageletLoader->
load
(
$request
,
$salesChannelContext
,
$customer
)
;
$page
->
setNewsletterAccountPagelet
(
$newslAccountPagelet
)
;
$this
->eventDispatcher->
dispatch
(
new
AccountOverviewPageLoadedEvent
(
$page
,
$salesChannelContext
,
$request
)
)
;
return
$page
;
}