protected function SearchApiFilterTrait::valueForm in Search API 8
Adds a form for entering the value or values for the filter.
Overridden to remove fields that won't be used (but aren't hidden either because of a small bug/glitch in the original form code – see #2637674).
Parameters
array $form: The form array, passed by reference.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
See also
\Drupal\views\Plugin\views\filter\FilterPluginBase::valueForm()
1 method overrides SearchApiFilterTrait::valueForm()
- SearchApiFulltext::valueForm in src/
Plugin/ views/ filter/ SearchApiFulltext.php - Adds a form for entering the value or values for the filter.
File
- src/
Plugin/ views/ filter/ SearchApiFilterTrait.php, line 28
Class
- SearchApiFilterTrait
- Provides a trait to use for Search API Views filters.
Namespace
Drupal\search_api\Plugin\views\filterCode
protected function valueForm(&$form, FormStateInterface $form_state) {
parent::valueForm($form, $form_state);
if (isset($form['value']['min']) && !$this
->operatorValues(2)) {
unset($form['value']['min'], $form['value']['max']);
}
}