function Search::valueForm

Same name and namespace in other branches
  1. 9 core/modules/search/src/Plugin/views/filter/Search.php \Drupal\search\Plugin\views\filter\Search::valueForm()
  2. 8.9.x core/modules/search/src/Plugin/views/filter/Search.php \Drupal\search\Plugin\views\filter\Search::valueForm()
  3. 10 core/modules/search/src/Plugin/views/filter/Search.php \Drupal\search\Plugin\views\filter\Search::valueForm()

Overrides FilterPluginBase::valueForm

File

core/modules/search/src/Plugin/views/filter/Search.php, line 93

Class

Search
Filter handler for search keywords.

Namespace

Drupal\search\Plugin\views\filter

Code

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

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