public function DeleteMedia::executeMultiple in Media entity 8
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 74
Class
- DeleteMedia
- Redirects to a media deletion form.
Namespace
Drupal\media_entity\Plugin\ActionCode
public function executeMultiple(array $entities) {
$info = [];
/** @var \Drupal\media_entity\MediaInterface $media */
foreach ($entities as $media) {
$langcode = $media
->language()
->getId();
$info[$media
->id()][$langcode] = $langcode;
}
$this->tempStore
->set($this->currentUser
->id(), $info);
}