function StringFilter::buildExposeForm
Same name in other branches
- 9 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::buildExposeForm()
- 10 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::buildExposeForm()
- 11.x core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::buildExposeForm()
Overrides FilterPluginBase::buildExposeForm
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ StringFilter.php, line 84
Class
- StringFilter
- Basic textfield filter to handle string filtering commands including equality, like, not like, etc.
Namespace
Drupal\views\Plugin\views\filterCode
public function buildExposeForm(&$form, FormStateInterface $form_state) {
parent::buildExposeForm($form, $form_state);
$form['expose']['placeholder'] = [
'#type' => 'textfield',
'#default_value' => $this->options['expose']['placeholder'],
'#title' => $this->t('Placeholder'),
'#size' => 40,
'#description' => $this->t('Hint text that appears inside the field when empty.'),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.