Views style plugins in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\views_style_plugins
- 10 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\views_style_plugins
Plugins that control how the collection of results is rendered in a view.
Style plugins control how a view is displayed. For the most part, they are object wrappers around theme templates. Examples of styles include HTML lists, tables, full or teaser content views, etc.
Many (but not all) style plugins have an optional row plugin, which displays a single record. Not all style plugins use row plugins, so it is up to the style plugin to set this up and call the row plugin. See the Views row plugins topic for more information.
Style plugins extend \Drupal\views\Plugin\views\style\StylePluginBase. They must be annotated with \Drupal\views\Annotation\ViewsStyle annotation, and they must be in namespace directory Plugin\views\style.
See also
Parent topics
File
- core/
modules/ views/ src/ Plugin/ views/ style/ StylePluginBase.php, line 14
Classes
Name | Location | Description |
---|---|---|
DefaultStyle |
core/ |
Unformatted style plugin to render rows one after another with no decorations. |
DefaultSummary |
core/ |
The default style plugin for summaries. |
EntityReference |
core/ |
EntityReference style plugin. |
Grid |
core/ |
Style plugin to render each item in a grid cell. |
HtmlList |
core/ |
Style plugin to render each item in an ordered or unordered list. |
Mapping |
core/ |
Allows fields to be mapped to specific use cases. |
MappingTest |
core/ |
Provides a test plugin for the mapping style. |
Opml |
core/ |
Default style plugin to render an OPML feed. |
Rss |
core/ |
Default style plugin to render an RSS feed. |
Serializer |
core/ |
The style plugin for serialized output formats. |
StylePluginBase |
core/ |
Base class for views style plugins. |
StyleTemplateTest |
core/ |
Provides a general test style template plugin. |
StyleTest |
core/ |
Provides a general test style plugin. |
Table |
core/ |
Style plugin to render each item as a row in a table. |
UnformattedSummary |
core/ |
The default style plugin for summaries. |
ViewsStyle |
core/ |
Defines a Plugin annotation object for views style plugins. |