You are here

public function EntityMergeBase::executeMultiple in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_entity/src/Plugin/Action/EntityMergeBase.php \Drupal\bibcite_entity\Plugin\Action\EntityMergeBase::executeMultiple()

Executes the plugin for an array of objects.

Parameters

array $objects: An array of entities.

Overrides ActionBase::executeMultiple

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

File

modules/bibcite_entity/src/Plugin/Action/EntityMergeBase.php, line 75

Class

EntityMergeBase
Base merge action for bibcite entities.

Namespace

Drupal\bibcite_entity\Plugin\Action

Code

public function executeMultiple(array $entities) {
  $info = [];

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