function FilterTest::buildOptionsForm
Provide the basic form which calls through to subforms.
If overridden, it is best to call through to the parent, or to at least make sure all of the functions in this form are called.
Overrides FilterPluginBase::buildOptionsForm
File
-
core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ filter/ FilterTest.php, line 28
Class
- FilterTest
- Plugin annotation @ViewsFilter("test_filter");
Namespace
Drupal\views_test_data\Plugin\views\filterCode
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'],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.