Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
LanguageRouteCacheTagsEvent example
/** * @return array<string> */
private
function
generateTags
(
Request
$request
, StoreApiResponse
$response
, SalesChannelContext
$context
, Criteria
$criteria
)
: array
{
$tags
=
array_merge
(
$this
->tracer->
get
(
self::
buildName
(
$context
->
getSalesChannelId
(
)
)
)
,
[
self::
buildName
(
$context
->
getSalesChannelId
(
)
)
, self::ALL_TAG
]
)
;
$event
=
new
LanguageRouteCacheTagsEvent
(
$tags
,
$request
,
$response
,
$context
,
$criteria
)
;
$this
->dispatcher->
dispatch
(
$event
)
;
return
array_unique
(
array_filter
(
$event
->
getTags
(
)
)
)
;
}
}