function Language::buildConfigurationForm

Same name in this branch
  1. 9 core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\Language::buildConfigurationForm()
Same name in other branches
  1. 8.9.x core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\Language::buildConfigurationForm()
  2. 10 core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\Language::buildConfigurationForm()
  3. 10 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language::buildConfigurationForm()
  4. 11.x core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\Language::buildConfigurationForm()
  5. 11.x 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\CKEditor5Plugin

Code

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.