Views query plugins

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\views_query_plugins
  2. 10 core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\views_query_plugins
  3. 11.x core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\views_query_plugins

Plugins for views queries.

Query plugins generate and execute a built query object against a particular storage backend, converting the Views query object into an actual query. Although query plugins need not necessarily use SQL, most other handler plugins that affect the query (fields, filters, etc.) implicitly assume that the query is using SQL.

Query plugins extend \Drupal\views\Plugin\views\query\QueryPluginBase. They must be annotated with \Drupal\views\Annotation\ViewsQuery annotation, and they must be in namespace directory Plugin\views\query.

See also

Plugin API

Parent topics

File

core/modules/views/src/Plugin/views/query/QueryPluginBase.php, line 12

Classes

Title Sort descending File name Summary
QueryPluginBase core/modules/views/src/Plugin/views/query/QueryPluginBase.php Base plugin class for Views queries.
Sql core/modules/views/src/Plugin/views/query/Sql.php Views query plugin for an SQL query.
ViewsQuery core/modules/views/src/Annotation/ViewsQuery.php Defines a Plugin annotation object for views query plugins.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.