public function AssignToMeTask::executeMultiple in Translation Management Tool 8
Executes the plugin for an array of objects.
Parameters
array $objects: An array of entities.
Overrides ActionBase::executeMultiple
1 call to AssignToMeTask::executeMultiple()
- AssignToMeTask::execute in translators/
tmgmt_local/ src/ Plugin/ Action/ AssignToMeTask.php - Executes the plugin.
File
- translators/
tmgmt_local/ src/ Plugin/ Action/ AssignToMeTask.php, line 36
Class
- AssignToMeTask
- Redirects to a task assign form.
Namespace
Drupal\tmgmt_local\Plugin\ActionCode
public function executeMultiple(array $entities) {
/** @var \Drupal\tmgmt_local\LocalTaskInterface $task */
foreach ($entities as $task) {
$task
->assign(\Drupal::currentUser());
$task
->save();
}
}