public function DeleteMedia::executeMultiple in Media Entity Actions 8
Same name and namespace in other branches
- 8.2 src/Plugin/Action/DeleteMedia.php \Drupal\media_entity_actions\Plugin\Action\DeleteMedia::executeMultiple()
Executes the plugin for an array of objects.
Parameters
array $objects: An array of entities.
Overrides ActionBase::executeMultiple
1 call to DeleteMedia::executeMultiple()
- DeleteMedia::execute in src/
Plugin/ Action/ DeleteMedia.php - Executes the plugin.
File
- src/
Plugin/ Action/ DeleteMedia.php, line 73
Class
- DeleteMedia
- Redirects to a media item deletion form.
Namespace
Drupal\media_entity_actions\Plugin\ActionCode
public function executeMultiple(array $entities) {
$info = [];
/** @var \Drupal\media\MediaInterface $media */
foreach ($entities as $media) {
$langcode = $media
->language()
->getId();
$info[$media
->id()][$langcode] = $langcode;
}
$this->tempStore
->set($this->currentUser
->id(), $info);
}