You are here

public function ViewsJsonFilter::buildOptionsForm in Views Json Source 8

Same name and namespace in other branches
  1. 1.x src/Plugin/views/filter/ViewsJsonFilter.php \Drupal\views_json_source\Plugin\views\filter\ViewsJsonFilter::buildOptionsForm()

Options form.

Overrides FilterPluginBase::buildOptionsForm

File

src/Plugin/views/filter/ViewsJsonFilter.php, line 223

Class

ViewsJsonFilter
Base filter handler for views_json_source.

Namespace

Drupal\views_json_source\Plugin\views\filter

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['key'] = [
    '#title' => $this
      ->t('Key Chooser'),
    '#description' => $this
      ->t('choose a key'),
    '#type' => 'textfield',
    '#default_value' => $this->options['key'],
    '#required' => TRUE,
  ];
}