Views filter handler plugins
Same name in other branches
- 9 core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\views_filter_handlers
- 8.9.x core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\views_filter_handlers
- 10 core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\views_filter_handlers
Plugins that handle views filtering.
Filter handler plugins extend \Drupal\views\Plugin\views\filter\FilterPluginBase. They must be attributed with \Drupal\views\Attribute\ViewsFilter attribute, and they must be in namespace directory Plugin\views\filter.
The following items can go into a hook_views_data() implementation in a filter section to affect how the filter handler will behave:
- allow empty: If true, the 'IS NULL' and 'IS NOT NULL' operators become available as standard operators.
You can refine the behavior of filters by setting the following Boolean member variables to TRUE in your plugin class:
- $alwaysMultiple: Disable the possibility of forcing a single value.
- $no_operator: Disable the possibility of using operators.
- $always_required: Disable the possibility of allowing an exposed input to be optional.
See also
Parent topics
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ FilterPluginBase.php, line 18
Classes
Title Sort descending | File name | Summary |
---|---|---|
Access | core/ |
Filter by node_access records. |
BooleanOperator | core/ |
Simple filter to handle matching of boolean values. |
BooleanOperatorString | core/ |
Simple filter to handle matching of boolean values. |
Broken | core/ |
A special handler to take the place of missing or broken handlers. |
Bundle | core/ |
Filter class which allows filtering by entity bundles. |
Current | core/ |
Filter handler for the current user. |
Date | core/ |
Date/time views filter. |
Date | core/ |
Filter to handle dates stored as a timestamp. |
EntityReference | core/ |
Filters a view by entity references. |
Equality | core/ |
Simple filter to handle equal to / not equal to filters. |
FilterBooleanOperatorDefaultTest | core/ |
Filter to test queryOpBoolean() with default operator. |
FilterPluginBase | core/ |
Base class for Views filters handler plugins. |
GroupByNumeric | core/ |
Simple filter to handle greater than/less than filters. |
HistoryUserTimestamp | core/ |
Filter for new content. |
InOperator | core/ |
Simple filter to handle matching of multiple options selectable via checkboxes. |
LanguageFilter | core/ |
Provides filtering by language. |
LatestRevision | core/ |
Filter to show only the latest revision of an entity. |
LatestTranslationAffectedRevision | core/ |
Filter to show only the latest translation affected revision of an entity. |
ListField | core/ |
Filter handler which uses list-fields as options. |
ManyToOne | core/ |
Complex filter to handle filtering for many to one relationships. |
ModerationStateFilter | core/ |
Provides a filter for the moderation state of an entity. |
Name | core/ |
Filter handler for usernames. |
NodeComment | core/ |
Filter based on comment node status. |
NumericFilter | core/ |
Simple filter to handle greater than/less than filters. |
Permissions | core/ |
Filter handler for user roles. |
Roles | core/ |
Filter handler for user roles. |
Search | core/ |
Filter handler for search keywords. |
Standard | core/ |
Default implementation of the base filter plugin. |
StatisticsLastUpdated | core/ |
Filter handler for the newer of last comment / node updated. |
Status | core/ |
Filter by published status. |
Status | core/ |
Filter by file status. |
Status | core/ |
Filter by published status. |
StringFilter | core/ |
Basic textfield filter to handle string filtering commands. |
TaxonomyIndexTid | core/ |
Filter by term id. |
TaxonomyIndexTidDepth | core/ |
Filter handler for taxonomy terms with depth. |
UidRevision | core/ |
Filter handler to check for revisions a certain user has created. |
UserUid | core/ |
UID filter to check for nodes that a user posted or commented on. |
UserUid | core/ |
Filter handler, accepts user ID to check for nodes user posted/commented on. |
ViewsFilter | core/ |
Defines a Plugin attribute class for views filter handlers. |
ViewsFilter | core/ |
Defines a Plugin annotation object for views filter handlers. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.