You are here

public function DeleteAction::executeMultiple in Entity API 8.0

Executes the plugin for an array of objects.

Parameters

array $objects: An array of entities.

Overrides ActionBase::executeMultiple

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

File

src/Plugin/Action/DeleteAction.php, line 78
Contains \Drupal\entity\Plugin\Action\DeleteAction.

Class

DeleteAction
Redirects to an entity deletion form.

Namespace

Drupal\entity\Plugin\Action

Code

public function executeMultiple(array $entities) {

  /** @var \Drupal\Core\Entity\ContentEntityInterface[] $entities */
  $selection = [];
  foreach ($entities as $entity) {
    $langcode = $entity
      ->language()
      ->getId();
    $selection[$entity
      ->id()][$langcode] = $langcode;
  }
  $this->tempStore
    ->set($this->currentUser
    ->id(), $selection);
}