You are here

Views overview in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/views.api.php \views_overview

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.

See also

\Drupal\views\ViewExecutable

\Drupal\views\Views

File

core/modules/views/views.api.php, line 13
Describes hooks and plugins provided by the Views module.

Sub-Topics

Namesort descending Location Description
Views hooks core/modules/views/views.api.php Hooks that allow other modules to implement the Views API.
Views plugins core/modules/views/views.api.php Overview of views plugins
Views template files core/modules/views/views.theme.inc Describes various views templates & overriding options.