Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
AccountProfilePageLoadedEvent example
$page
=
$this
->genericLoader->
load
(
$request
,
$salesChannelContext
)
;
$page
= AccountProfilePage::
createFrom
(
$page
)
;
if
(
$page
->
getMetaInformation
(
)
)
{
$page
->
getMetaInformation
(
)
->
setRobots
(
'noindex,follow'
)
;
}
$page
->
setSalutations
(
$this
->
getSalutations
(
$salesChannelContext
,
$request
)
)
;
$this
->eventDispatcher->
dispatch
(
new
AccountProfilePageLoadedEvent
(
$page
,
$salesChannelContext
,
$request
)
)
;
return
$page
;
}
private
function
getSalutations
(
SalesChannelContext
$context
, Request
$request
)
: SalutationCollection
{
$event
=
new
SalutationRouteRequestEvent
(
$request
,
new
Request
(
)
,
$context
,
new
Criteria
(
)
)
;
$this
->eventDispatcher->
dispatch
(
$event
)
;
$salutations
=
$this
->salutationRoute