function TaxonomyIndexTid::buildExposeForm
Same name in other branches
- 9 core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::buildExposeForm()
- 10 core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::buildExposeForm()
- 11.x core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::buildExposeForm()
Overrides InOperator::buildExposeForm
File
-
core/
modules/ taxonomy/ src/ Plugin/ views/ filter/ TaxonomyIndexTid.php, line 370
Class
- TaxonomyIndexTid
- Filter by term id.
Namespace
Drupal\taxonomy\Plugin\views\filterCode
public function buildExposeForm(&$form, FormStateInterface $form_state) {
parent::buildExposeForm($form, $form_state);
if ($this->options['type'] != 'select') {
unset($form['expose']['reduce']);
}
$form['error_message'] = [
'#type' => 'checkbox',
'#title' => $this->t('Display error message'),
'#default_value' => !empty($this->options['error_message']),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.