public function SendContextAction::executeMultiple in TMGMT Translator Smartling 8.2
Same name and namespace in other branches
- 8.4 src/Plugin/Action/SendContextAction.php \Drupal\tmgmt_smartling\Plugin\Action\SendContextAction::executeMultiple()
- 8 src/Plugin/Action/SendContextAction.php \Drupal\tmgmt_smartling\Plugin\Action\SendContextAction::executeMultiple()
- 8.3 src/Plugin/Action/SendContextAction.php \Drupal\tmgmt_smartling\Plugin\Action\SendContextAction::executeMultiple()
Executes the plugin for an array of objects.
Parameters
array $objects: An array of entities.
Overrides ActionBase::executeMultiple
1 call to SendContextAction::executeMultiple()
- SendContextAction::execute in src/
Plugin/ Action/ SendContextAction.php - Executes the plugin.
File
- src/
Plugin/ Action/ SendContextAction.php, line 103 - Contains \Drupal\smartling\Plugin\Action\TranslateNode.
Class
- SendContextAction
- Translate entity.
Namespace
Drupal\tmgmt_smartling\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);
}