protected function ScannerAdminForm::getLanguages in Search and Replace Scanner 8
Gets a list of languages as input options.
Return value
array An array containing the list of enabled languages.
1 call to ScannerAdminForm::getLanguages()
- ScannerAdminForm::buildForm in src/
Form/ ScannerAdminForm.php - Form constructor.
File
- src/
Form/ ScannerAdminForm.php, line 313
Class
- ScannerAdminForm
- Form for configuring the default scanner settings.
Namespace
Drupal\scanner\FormCode
protected function getLanguages() {
$languages = $this->languageManager
->getLanguages();
$items = [
'all' => $this
->t('All'),
];
foreach ($languages as $language) {
$items[$language
->getId()] = $language
->getName();
}
return $items;
}