You are here

public function FilterTest::buildOptionsForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php \Drupal\views_test_data\Plugin\views\filter\FilterTest::buildOptionsForm()
  2. 9 core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php \Drupal\views_test_data\Plugin\views\filter\FilterTest::buildOptionsForm()

Overrides Drupal\views\Plugin\views\row\RowPluginBase::buildOptionsForm().

Return value

array

Overrides FilterPluginBase::buildOptionsForm

File

core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php, line 30

Class

FilterTest
Plugin annotation @ViewsFilter("test_filter");

Namespace

Drupal\views_test_data\Plugin\views\filter

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['test_enable'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Controls whether the filter plugin should be active'),
    '#default_value' => $this->options['test_enable'],
  ];
}