Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
printErrors example
$progress
=
new
Progress
(
$log
->
getId
(
)
, Progress::STATE_PROGRESS, 0
)
;
do
{
$progress
=
$importExport
->
import
(
Context::
createDefaultContext
(
)
,
$progress
->
getOffset
(
)
)
;
$progressBar
->
setProgress
(
$progress
->
getOffset
(
)
)
;
$records
+=
$progress
->
getProcessedRecords
(
)
;
}
while
(
!
$progress
->
isFinished
(
)
)
;
$elapsed
=
time
(
)
-
$startTime
;
$io
->
newLine
(
2
)
;
if
(
$printErrors
)
{
$this
->
printErrors
(
$importExport
,
$log
,
$io
,
$doRollback
&&
$progress
->
getState
(
)
=== Progress::STATE_FAILED
)
;
}
$this
->
printResults
(
$log
,
$io
)
;
if
(
$dryRun
)
{
$io
->
info
(
sprintf
(
'Dry run completed in %d seconds',
$elapsed
)
)
;
return
self::SUCCESS;
}
if
(
!
$doRollback
||
$progress
->
getState
(
)
=== Progress::STATE_SUCCEEDED
)
{