protected function LingotekManagementFormBase::getAllGroups in Lingotek Translation 4.0.x
Same name and namespace in other branches
- 8.2 src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getAllGroups()
- 3.0.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getAllGroups()
- 3.1.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getAllGroups()
- 3.2.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getAllGroups()
- 3.3.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getAllGroups()
- 3.4.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getAllGroups()
- 3.5.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getAllGroups()
- 3.6.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getAllGroups()
- 3.7.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getAllGroups()
- 3.8.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getAllGroups()
Gets all the groups as options.
Return value
array The groups as a valid options array.
1 call to LingotekManagementFormBase::getAllGroups()
- LingotekManagementForm::getFilters in src/
Form/ LingotekManagementForm.php - Gets the filters for rendering.
File
- src/
Form/ LingotekManagementFormBase.php, line 1684
Class
- LingotekManagementFormBase
- Form for bulk management of content.
Namespace
Drupal\lingotek\FormCode
protected function getAllGroups() {
$options = [];
if ($this->entityTypeId === 'node') {
/** @var GroupInterface[] $groups */
$groups = $this->entityTypeManager
->getStorage('group')
->loadMultiple();
foreach ($groups as $id => $group) {
$options[$id] = $group
->label();
}
}
return $options;
}