public function ExportProcessor::exportEntitiesList in Content Synchronizer 3.x
Same name and namespace in other branches
- 8.2 src/Processors/ExportProcessor.php \Drupal\content_synchronizer\Processors\ExportProcessor::exportEntitiesList()
- 8 src/Processors/ExportProcessor.php \Drupal\content_synchronizer\Processors\ExportProcessor::exportEntitiesList()
Export the list of entities.
1 call to ExportProcessor::exportEntitiesList()
- ExportProcessor::exportEntity in src/
Processors/ ExportProcessor.php - Export the entity.
File
- src/
Processors/ ExportProcessor.php, line 45
Class
- ExportProcessor
- Export Processor.
Namespace
Drupal\content_synchronizer\ProcessorsCode
public function exportEntitiesList(array $entities) {
self::$currentExportProcessor = $this;
foreach ($entities as $entity) {
// Get the plugin of the entity :
/** @var \Drupal\content_synchronizer\Processors\Entity\EntityProcessorBase $plugin */
$plugin = $this->entityProcessorPluginManager
->getInstanceByEntityType($entity
->getEntityTypeId());
$plugin
->export($entity);
$this->writer
->addRootEntity($entity);
}
}