public function BatchImportProcessor::import in Content Synchronizer 3.x
Same name and namespace in other branches
- 8.2 src/Processors/BatchImportProcessor.php \Drupal\content_synchronizer\Processors\BatchImportProcessor::import()
- 8 src/Processors/BatchImportProcessor.php \Drupal\content_synchronizer\Processors\BatchImportProcessor::import()
Launch the import of the import entity.
Parameters
\Drupal\content_synchronizer\Entity\ImportEntity $import: The import entity.
array $entitiesToImport: The entities to import.
mixed $finishCallBack: The finishcallback.
string $creationType: The creation entity type.
string $updateType: The update entity type.
File
- src/
Processors/ BatchImportProcessor.php, line 37
Class
- BatchImportProcessor
- Batch Import.
Namespace
Drupal\content_synchronizer\ProcessorsCode
public function import(ImportEntity $import, array $entitiesToImport, $finishCallBack = NULL, $creationType = ImportProcessor::DEFAULT_PUBLICATION_TYPE, $updateType = ImportProcessor::DEFAULT_UPDATE_TYPE) {
$operations = $this
->getBatchOperations($import, $entitiesToImport, $finishCallBack, $creationType, $updateType);
$batch = [
'title' => $this
->t('Importing entities...'),
'operations' => $operations,
'finished' => get_called_class() . '::onFinishBatchProcess',
];
batch_set($batch);
}