You are here

protected function Search::operatorForm in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/search/src/Plugin/views/filter/Search.php \Drupal\search\Plugin\views\filter\Search::operatorForm()

Options form subform for setting the operator.

This may be overridden by child classes, and it must define $form['operator'];

Overrides FilterPluginBase::operatorForm

See also

buildOptionsForm()

File

core/modules/search/src/Plugin/views/filter/Search.php, line 74
Contains \Drupal\search\Plugin\views\filter\Search.

Class

Search
Filter handler for search keywords.

Namespace

Drupal\search\Plugin\views\filter

Code

protected function operatorForm(&$form, FormStateInterface $form_state) {
  $form['operator'] = array(
    '#type' => 'radios',
    '#title' => $this
      ->t('On empty input'),
    '#default_value' => $this->operator,
    '#options' => array(
      'optional' => $this
        ->t('Show All'),
      'required' => $this
        ->t('Show None'),
    ),
  );
}