Views exposed form plugins
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginInterface.php \Drupal\views\Plugin\views\exposed_form\views_exposed_form_plugins
- 10 core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginInterface.php \Drupal\views\Plugin\views\exposed_form\views_exposed_form_plugins
- 11.x core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginInterface.php \Drupal\views\Plugin\views\exposed_form\views_exposed_form_plugins
Plugins that handle validation, submission, and rendering of exposed forms.
Exposed forms are used for filters, sorts, and pager settings that are exposed to site visitors. Exposed form plugins handle the rendering, validation, and submission of exposed forms, and may add additional form elements.
To define an Exposed Form Plugin in a module you need to:
- Implement \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginInterface.
- Usually you will want to extend the \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase class.
- Exposed form plugins are annotated with \Drupal\views\Annotation\ViewsExposedForm annotation. See the Annotations topic for more information about annotations.
- They must be in namespace directory Plugin\views\exposed_form.
File
-
core/
modules/ views/ src/ Plugin/ views/ exposed_form/ ExposedFormPluginInterface.php, line 8
Classes
Title Sort descending | File name | Summary |
---|---|---|
Basic | core/ |
Exposed form plugin that provides a basic exposed form. |
ExposedFormPluginBase | core/ |
Base class for Views exposed filter form plugins. |
InputRequired | core/ |
Exposed form plugin that provides an exposed form with required input. |
ViewsExposedForm | core/ |
Defines a Plugin annotation object for views exposed form plugins. |
Interfaces
Title Sort descending | File name | Summary |
---|---|---|
ExposedFormPluginInterface | core/ |
Interface for exposed filter form plugins. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.