Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
LandingPageLoadedEvent example
$page
->
setLandingPage
(
$landingPage
)
;
$metaInformation
=
new
MetaInformation
(
)
;
$metaTitle
=
$landingPage
->
getMetaTitle
(
)
??
$landingPage
->
getName
(
)
;
$metaInformation
->
setMetaTitle
(
$metaTitle
?? ''
)
;
$metaInformation
->
setMetaDescription
(
$landingPage
->
getMetaDescription
(
)
?? ''
)
;
$metaInformation
->
setMetaKeywords
(
$landingPage
->
getKeywords
(
)
?? ''
)
;
$page
->
setMetaInformation
(
$metaInformation
)
;
$this
->eventDispatcher->
dispatch
(
new
LandingPageLoadedEvent
(
$page
,
$context
,
$request
)
)
;
return
$page
;
}
}