function TermName::buildOptionsForm

Same name in this branch
  1. 10 core/modules/taxonomy/src/Plugin/views/argument_validator/TermName.php \Drupal\taxonomy\Plugin\views\argument_validator\TermName::buildOptionsForm()
Same name in other branches
  1. 9 core/modules/taxonomy/src/Plugin/views/argument_validator/TermName.php \Drupal\taxonomy\Plugin\views\argument_validator\TermName::buildOptionsForm()
  2. 9 core/modules/taxonomy/src/Plugin/views/field/TermName.php \Drupal\taxonomy\Plugin\views\field\TermName::buildOptionsForm()
  3. 8.9.x core/modules/taxonomy/src/Plugin/views/argument_validator/TermName.php \Drupal\taxonomy\Plugin\views\argument_validator\TermName::buildOptionsForm()
  4. 8.9.x core/modules/taxonomy/src/Plugin/views/field/TermName.php \Drupal\taxonomy\Plugin\views\field\TermName::buildOptionsForm()
  5. 11.x core/modules/taxonomy/src/Plugin/views/argument_validator/TermName.php \Drupal\taxonomy\Plugin\views\argument_validator\TermName::buildOptionsForm()
  6. 11.x core/modules/taxonomy/src/Plugin/views/field/TermName.php \Drupal\taxonomy\Plugin\views\field\TermName::buildOptionsForm()

Overrides EntityField::buildOptionsForm

File

core/modules/taxonomy/src/Plugin/views/field/TermName.php, line 47

Class

TermName
Displays taxonomy term names and allows converting spaces to hyphens.

Namespace

Drupal\taxonomy\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    $form['convert_spaces'] = [
        '#title' => $this->t('Convert spaces in term names to hyphens'),
        '#type' => 'checkbox',
        '#default_value' => !empty($this->options['convert_spaces']),
    ];
    parent::buildOptionsForm($form, $form_state);
}

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