You are here

public function ExportAction::executeMultiple in Content Synchronizer 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Action/ExportAction.php \Drupal\content_synchronizer\Plugin\Action\ExportAction::executeMultiple()
  2. 3.x src/Plugin/Action/ExportAction.php \Drupal\content_synchronizer\Plugin\Action\ExportAction::executeMultiple()

Executes the plugin for an array of objects.

Parameters

array $objects: An array of entities.

Overrides ActionBase::executeMultiple

1 call to ExportAction::executeMultiple()
ExportAction::execute in src/Plugin/Action/ExportAction.php
Executes the plugin.

File

src/Plugin/Action/ExportAction.php, line 66

Class

ExportAction
Export entity.

Namespace

Drupal\content_synchronizer\Plugin\Action

Code

public function executeMultiple(array $entities) {
  $info = [
    'url' => \Drupal::request()
      ->getRequestUri(),
    'entities' => [],
  ];

  /** @var \Drupal\Core\Entity\EntityInterface $entity */
  foreach ($entities as $entity) {
    $info['entities'][$entity
      ->getEntityTypeId()][] = $entity
      ->id();
  }
  $this->tempStore
    ->set($this->currentUser
    ->id(), $info);
}