You are here

public function ExportProcessor::exportEntitiesList in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Processors/ExportProcessor.php \Drupal\content_synchronizer\Processors\ExportProcessor::exportEntitiesList()
  2. 3.x 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\Processors

Code

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);
  }
}