Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LanguageField.php

function 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'],
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal