protected function LingotekManagementRelatedEntitiesForm::getSelectedEntities in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8.2 src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getSelectedEntities()
- 4.0.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getSelectedEntities()
- 3.0.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getSelectedEntities()
- 3.1.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getSelectedEntities()
- 3.2.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getSelectedEntities()
- 3.3.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getSelectedEntities()
- 3.5.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getSelectedEntities()
- 3.6.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getSelectedEntities()
- 3.7.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getSelectedEntities()
- 3.8.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getSelectedEntities()
Load the entities corresponding with the given identifiers.
Parameters
string[] $values: Array of values that identify the selected entities.
Return value
\Drupal\Core\Entity\EntityInterface[] The entities.
Overrides LingotekManagementFormBase::getSelectedEntities
File
- src/
Form/ LingotekManagementRelatedEntitiesForm.php, line 135
Class
- LingotekManagementRelatedEntitiesForm
- Form for bulk management of related content.
Namespace
Drupal\lingotek\FormCode
protected function getSelectedEntities($values) {
$entityTypes = [];
$entities = [];
foreach ($values as $type_entity_id) {
list($type, $entity_id) = explode(":", $type_entity_id);
$entityTypes[$type][] = $entity_id;
}
foreach ($entityTypes as $type => $values) {
$entities = array_merge($entities, $this->entityTypeManager
->getStorage($type)
->loadMultiple($values));
}
return $entities;
}