function LanguageSelectWidget::settingsForm

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/LanguageSelectWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\LanguageSelectWidget::settingsForm()
  2. 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/LanguageSelectWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\LanguageSelectWidget::settingsForm()
  3. 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/LanguageSelectWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\LanguageSelectWidget::settingsForm()

Overrides WidgetBase::settingsForm

File

core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/LanguageSelectWidget.php, line 49

Class

LanguageSelectWidget
Plugin implementation of the 'Language' widget.

Namespace

Drupal\Core\Field\Plugin\Field\FieldWidget

Code

public function settingsForm(array $form, FormStateInterface $form_state) {
    $element = parent::settingsForm($form, $form_state);
    $element['include_locked'] = [
        '#type' => 'checkbox',
        '#title' => $this->t('Include locked languages such as <em>Not specified</em> and <em>Not applicable</em>'),
        '#default_value' => $this->getSetting('include_locked'),
    ];
    return $element;
}

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