Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
SalesChannelRepositoryIterator example
->
setOffset
(
$exportBehavior
->
offset
(
)
)
->
setLimit
(
$this
->readBufferSize
)
;
foreach
(
$associations
as
$association
)
{
$criteria
->
addAssociation
(
$association
)
;
}
$this
->eventDispatcher->
dispatch
(
new
ProductExportProductCriteriaEvent
(
$criteria
,
$productExport
,
$exportBehavior
,
$context
)
)
;
$iterator
=
new
SalesChannelRepositoryIterator
(
$this
->productRepository,
$context
,
$criteria
)
;
$total
=
$iterator
->
getTotal
(
)
;
if
(
$total
=== 0
)
{
$exception
=
new
EmptyExportException
(
$productExport
->
getId
(
)
)
;
$loggingEvent
=
new
ProductExportLoggingEvent
(
$context
->
getContext
(
)
,
$exception
->
getMessage
(
)
,
Level::Warning,
$exception
)
;