public function Language::buildConfigurationForm in Drupal 10
Same name in this branch
- 10 core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\Language::buildConfigurationForm()
- 10 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language::buildConfigurationForm()
See also
\Drupal\editor\Form\EditorImageDialog
editor_image_upload_settings_form()
File
- core/
modules/ ckeditor5/ src/ Plugin/ CKEditor5Plugin/ Language.php, line 62
Class
- Language
- CKEditor 5 Language plugin.
Namespace
Drupal\ckeditor5\Plugin\CKEditor5PluginCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$predefined_languages = LanguageManager::getStandardLanguageList();
$form['language_list'] = [
'#title' => $this
->t('Language list'),
'#title_display' => 'invisible',
'#type' => 'select',
'#options' => [
'un' => $this
->t("United Nations' official languages"),
'all' => $this
->t('All @count languages', [
'@count' => count($predefined_languages),
]),
],
'#default_value' => $this->configuration['language_list'],
'#description' => $this
->t('The list of languages to show in the language dropdown. The basic list will only show the <a href=":url">six official languages of the UN</a>. The extended list will show all @count languages that are available in Drupal.', [
':url' => 'https://www.un.org/en/sections/about-un/official-languages',
'@count' => count($predefined_languages),
]),
];
return $form;
}