public function BaseJobAction::executeMultiple in TMGMT Extension Suite 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/Action/BaseJobAction.php \Drupal\tmgmt_extension_suit\Plugin\Action\BaseJobAction::executeMultiple()
- 8 src/Plugin/Action/BaseJobAction.php \Drupal\tmgmt_extension_suit\Plugin\Action\BaseJobAction::executeMultiple()
Executes the plugin for an array of objects.
Parameters
array $objects: An array of entities.
Overrides ActionBase::executeMultiple
1 call to BaseJobAction::executeMultiple()
- BaseJobAction::execute in src/
Plugin/ Action/ BaseJobAction.php - Executes the plugin.
File
- src/
Plugin/ Action/ BaseJobAction.php, line 85
Class
Namespace
Drupal\tmgmt_extension_suit\Plugin\ActionCode
public function executeMultiple(array $entities) {
$ids = [];
/** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
foreach ($entities as $entity) {
$ids[$entity
->id()] = $entity
->getEntityTypeId();
}
$entity = reset($entities);
if ($entity instanceof EntityInterface) {
$entity_type = $entity
->getEntityTypeId();
}
$this->tempStoreFactory
->get($this
->getTempStoreName($entity_type))
->set($this->currentUser
->id(), $ids);
}