Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
shouldBeRun example
foreach
(
$salesChannelIds
as
$salesChannelId
)
{
$productExports
=
$this
->
fetchProductExports
(
$salesChannelId
)
;
if
(
\
count
(
$productExports
)
=== 0
)
{
continue
;
}
$now
=
new
\
DateTimeImmutable
(
'now'
)
;
foreach
(
$productExports
as
$productExport
)
{
if
(
!
$this
->
shouldBeRun
(
$productExport
,
$now
)
)
{
continue
;
}
$this
->messageBus->
dispatch
(
new
ProductExportPartialGeneration
(
$productExport
->
getId
(
)
,
$salesChannelId
)
)
;
}
}
}
/** * @return array<string> */