You are here

public function DeleteUnit::executeMultiple in Booking and Availability Management Tools for Drupal 8

Executes the plugin for an array of objects.

Parameters

array $objects: An array of entities.

Overrides ActionBase::executeMultiple

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

File

modules/bat_unit/src/Plugin/Action/DeleteUnit.php, line 79
Contains \Drupal\bat_unit\Plugin\Action\DeleteUnit.

Class

DeleteUnit
Redirects to a unit deletion form.

Namespace

Drupal\bat_unit\Plugin\Action

Code

public function executeMultiple(array $entities) {
  $info = [];
  foreach ($entities as $unit) {
    $langcode = $unit
      ->language()
      ->getId();
    $info[$unit
      ->id()][$langcode] = $langcode;
  }
  $this->tempStore
    ->set($this->currentUser
    ->id(), $info);
}