function LanguageField::buildOptionsForm

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/field/LanguageField.php \Drupal\views\Plugin\views\field\LanguageField::buildOptionsForm()
  2. 10 core/modules/views/src/Plugin/views/field/LanguageField.php \Drupal\views\Plugin\views\field\LanguageField::buildOptionsForm()
  3. 11.x core/modules/views/src/Plugin/views/field/LanguageField.php \Drupal\views\Plugin\views\field\LanguageField::buildOptionsForm()

Overrides FieldPluginBase::buildOptionsForm

File

core/modules/views/src/Plugin/views/field/LanguageField.php, line 30

Class

LanguageField
Defines a field handler to translate a language into its readable form.

Namespace

Drupal\views\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);
    $form['native_language'] = [
        '#title' => $this->t('Display in native language'),
        '#type' => 'checkbox',
        '#default_value' => $this->options['native_language'],
    ];
}

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