You are here

public function FilterTest::buildOptionsForm in Views (for Drupal 7) 8.3

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

Return value

array

Overrides FilterPluginBase::buildOptionsForm

File

tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/filter/FilterTest.php, line 42
Definition of Drupal\views_test_data\Plugin\views\filter\FilterTest.

Class

FilterTest
Plugin annotation @Plugin( id = "test_filter", title = @Translation("Test filter plugin"), help = @Translation("Provides a generic filter test plugin."), base = "node", type = "type" )

Namespace

Drupal\views_test_data\Plugin\views\filter

Code

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