protected function LingotekManagementForm::getAllLanguages in Lingotek Translation 8
Gets all the languages as options.
Return value
array The languages as a valid options array.
1 call to LingotekManagementForm::getAllLanguages()
- LingotekManagementForm::buildForm in src/
Form/ LingotekManagementForm.php - Form constructor.
File
- src/
Form/ LingotekManagementForm.php, line 1160 - Contains \Drupal\Lingotek\Form\LingotekManagementForm.
Class
- LingotekManagementForm
- Form for bulk management of content.
Namespace
Drupal\lingotek\FormCode
protected function getAllLanguages() {
$languages = $this->languageManager
->getLanguages();
$options = [];
foreach ($languages as $id => $language) {
$options[$id] = $language
->getName();
}
return $options;
}