public function DeleteAction::executeMultiple in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Action/Plugin/Action/DeleteAction.php \Drupal\Core\Action\Plugin\Action\DeleteAction::executeMultiple()
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 core/
lib/ Drupal/ Core/ Action/ Plugin/ Action/ DeleteAction.php - Executes the plugin.
File
- core/
lib/ Drupal/ Core/ Action/ Plugin/ Action/ DeleteAction.php, line 75
Class
- DeleteAction
- Redirects to an entity deletion form.
Namespace
Drupal\Core\Action\Plugin\ActionCode
public function executeMultiple(array $entities) {
/** @var \Drupal\Core\Entity\EntityInterface[] $entities */
$selection = [];
foreach ($entities as $entity) {
$langcode = $entity
->language()
->getId();
$selection[$entity
->id()][$langcode] = $langcode;
}
$this->tempStore
->set($this->currentUser
->id() . ':' . $this
->getPluginDefinition()['type'], $selection);
}