Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ProductExportChangeEncodingEvent example
if
(
$exportBehavior
->
batchMode
(
)
)
{
break
;
}
}
$content
.=
$this
->seoUrlPlaceholderHandler->
replace
(
$body
,
$productExport
->
getSalesChannelDomain
(
)
->
getUrl
(
)
,
$context
)
;
if
(
$exportBehavior
->
generateFooter
(
)
)
{
$content
.=
$this
->productExportRender->
renderFooter
(
$productExport
,
$context
)
;
}
$encodingEvent
=
$this
->eventDispatcher->
dispatch
(
new
ProductExportChangeEncodingEvent
(
$productExport
,
$content
,
mb_convert_encoding
(
$content
,
$productExport
->
getEncoding
(
)
)
)
)
;
$this
->translator->
resetInjection
(
)
;
$this
->connection->
delete
(
'sales_channel_api_context',
[
'token' =>
$contextToken
]
)
;
if
(
empty
(
$content
)
)
{
return
null;
}
return
new
ProductExportResult
(