protected function MappingSteps::getLanguageList in GatherContent 8.4
Same name and namespace in other branches
- 8.5 gathercontent_ui/src/Form/MappingEditSteps/MappingSteps.php \Drupal\gathercontent_ui\Form\MappingEditSteps\MappingSteps::getLanguageList()
Get list of languages as assoc array.
Return value
array Assoc array of languages keyed by lang code, value is language name.
2 calls to MappingSteps::getLanguageList()
- MappingStepEdit::getForm in gathercontent_ui/
src/ Form/ MappingEditSteps/ MappingStepEdit.php - Returns form array.
- MappingStepNew::getForm in gathercontent_ui/
src/ Form/ MappingEditSteps/ MappingStepNew.php - Returns form array.
File
- gathercontent_ui/
src/ Form/ MappingEditSteps/ MappingSteps.php, line 532
Class
- MappingSteps
- Class MappingSteps.
Namespace
Drupal\gathercontent_ui\Form\MappingEditStepsCode
protected function getLanguageList() {
$languages = \Drupal::service('language_manager')
->getLanguages(LanguageInterface::STATE_CONFIGURABLE);
$language_list = [];
foreach ($languages as $lang_code => $language) {
/** @var \Drupal\Core\Language\Language $language */
$language_list[$lang_code] = $language
->getName();
}
return $language_list;
}