protected function Search::valueForm in Drupal 8
Same name and namespace in other branches
- 9 core/modules/search/src/Plugin/views/filter/Search.php \Drupal\search\Plugin\views\filter\Search::valueForm()
Options form subform for setting options.
This should be overridden by all child classes and it must define $form['value']
Overrides FilterPluginBase::valueForm
See also
buildOptionsForm()
File
- core/
modules/ search/ src/ Plugin/ views/ filter/ Search.php, line 88
Class
- Search
- Filter handler for search keywords.
Namespace
Drupal\search\Plugin\views\filterCode
protected function valueForm(&$form, FormStateInterface $form_state) {
$form['value'] = [
'#type' => 'textfield',
'#size' => 15,
'#default_value' => $this->value,
'#attributes' => [
'title' => $this
->t('Search keywords'),
],
'#title' => !$form_state
->get('exposed') ? $this
->t('Keywords') : '',
];
}