Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
CountryStateDataPageletLoadedEvent example
$page
=
new
CountryStateDataPagelet
(
)
;
$criteria
=
new
Criteria
(
)
;
$this
->eventDispatcher->
dispatch
(
new
CountryStateDataPageletCriteriaEvent
(
$criteria
,
$context
,
$request
)
)
;
$countryRouteResponse
=
$this
->countryStateRoute->
load
(
$countryId
,
$request
,
$criteria
,
$context
)
;
$page
->
setStates
(
$countryRouteResponse
->
getStates
(
)
)
;
$this
->eventDispatcher->
dispatch
(
new
CountryStateDataPageletLoadedEvent
(
$page
,
$context
,
$request
)
)
;
return
$page
;
}
}