Provide a generic access check for "does a filter format or editor have a filter plugin enabled"

Created on 8 June 2023, over 1 year ago
Updated 8 March 2024, 8 months ago

Problem/Motivation

The Embed module and all of its related modules have a need to check if an editor or filter format has a specific filter plugin enabled in their routes. Core does not have something we could use, but also has a need for it, and was done in a custom way with \Drupal\media\Controller\MediaFilterController::formatUsesMediaEmbedFilter().

Proposed resolution

I propose a generic _filter_plugin_enabled access_check service that supports a single string or an array of filter plugin IDs that must be enabled if a {filter_format} or {editor} route parameter is available.

Remaining tasks

User interface changes

None

API changes

Data model changes

None

Release notes snippet

Added a new _filter_format_enabled: 'plugin_id' route requirement available to check if a filter format has a specific format plugin enabled.

Feature request
Status

Needs work

Version

11.0 🔥

Component
Editor 

Last updated 17 days ago

Created by

🇺🇸United States dave reid Nebraska USA

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024