Views style plugins with the `attachTo` method should implement an interface

Created on 4 August 2016, about 8 years ago
Updated 21 February 2023, over 1 year ago

Problem/Motivation

While looking into #2778569: REST views: Consider implementing `attachTo` method in `RestExport` display plugin , I realized that several Views style plugins have a attachTo method. In some places the docblock uses {@inheritdoc}, in other places there is no docblock. Either way, this method is not part of the ViewsPluginBase class.

This impacts the 2 feed style plugins: OPML and RSS.

Proposed resolution

Add a new interface AttachableStyle or similar, that defines this method.

The code in \Drupal\views\Plugin\views\display\Feed::attachTo() can then check if the plugins implement that interface:

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs work

Version

10.1

Component
Views 

Last updated about 10 hours ago

Created by

🇺🇸United States jhedstrom Portland, OR

Live updates comments and jobs are added and updated live.
  • Documentation

    Primarily changes documentation, not code. For Drupal core issues, select the Documentation component instead of using this tag. In general, component selection is preferred over tag selection.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024