$path =
$file->
getPath();
$progress->
setTotal($this->filesystem->
fileSize($path));
$invalidRecordsProgress = null;
$failedRecords =
[];
$resource =
$this->filesystem->
readStream($path);
$config = Config::
fromLog($this->logEntity
);
$overallResults =
$this->logEntity->
getResult();
$this->eventDispatcher->
addListener(WriteCommandExceptionEvent::
class,
$this->
onWriteException(...
));
$createEntities =
$config->
get('createEntities'
) ?? true;
$updateEntities =
$config->
get('updateEntities'
) ?? true;
$context->
addState(Context::SKIP_TRIGGER_FLOW
);
foreach ($this->reader->
read($config,
$resource,
$offset) as $row) { $event =
new ImportExportBeforeImportRowEvent($row,
$config,
$context);
$this->eventDispatcher->
dispatch($event);
$row =
$event->
getRow();