Views overview in Drupal 10
Same name and namespace in other branches
Overview of the Views module API
The Views module is a generalized query and display engine, which can be used to make views (formatted lists, grids, feeds, and other output) of items (often entities, but can be other types of data). Developers can interact with Views in several ways:
- Provide plugins: Views plugins govern nearly every aspect of views, including querying (sorting, filtering, etc.) and display (at several levels of granularity, ranging from the entire view to the details of a field). See the Views plugins topic for more information.
- Provide data: Data types can be provided to Views by implementing hook_views_data(), and data types provided by other modules can be altered by implementing hook_views_data_alter(). To provide views data for an entity, create a class implementing \Drupal\views\EntityViewsDataInterface and reference this in the "views_data" annotation in the entity class. You can autogenerate big parts of the integration if you extend the \Drupal\views\EntityViewsData base class. See the Entity API topic for more information about entities.
- Implement hooks: A few operations in Views can be influenced by hooks. See the Views hooks topic for a list.
- Theming: See the Views templates topic for more information.
modules/ views/ views.api.php, line 13
- Describes hooks and plugins provided by the Views module.