- Merge request !2026Issue #2385047: Remove disabled filters from text format configuration → (Open) created by codebymikey
- 🇳🇱Netherlands Eric_A
This now needs a small cleanup after 🐛 Consistently sort filter formats to simplify config exports Fixed .
As for the needed update function:filter_post_update_sort_filters()
from that issue must be perfect example code. - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
This will help make 📌 [PP-2] Make FilterFormat config entities fully validatable Postponed simpler.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
AFAICT this should also change
# Filter with module and status. filter: type: mapping label: 'Filter' mapping: id: type: string label: 'ID' constraints: PluginExists: manager: plugin.manager.filter interface: 'Drupal\filter\Plugin\FilterInterface' provider: type: string label: 'Provider' status: type: boolean label: 'Status' weight: type: integer label: 'Weight' settings: type: filter_settings.[%parent.id]
to:
filter: type: mapping label: 'Filter' mapping: id: type: string label: 'ID' constraints: PluginExists: manager: plugin.manager.filter interface: 'Drupal\filter\Plugin\FilterInterface' provider: type: string label: 'Provider' weight: type: integer label: 'Weight' settings: type: filter_settings.[%parent.id]
… because all entries in
filter.format.*:filters
will havestatus: true
. - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Also:
\Drupal\ckeditor5\Plugin\CKEditor5PluginManager::isPluginDisabled()
can be simplified thanks to this change:diff --git a/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php b/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php index 5f900126b1..5b1391a925 100644 --- a/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php +++ b/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php @@ -483,10 +485,7 @@ protected function isPluginDisabled(CKEditor5PluginInterface $plugin, EditorInte case 'filter': $filters = $editor->getFilterFormat()->filters(); assert($filters instanceof FilterPluginCollection); - if (!$filters->has($required_value) || !$filters->get($required_value)->status) { - return TRUE; - } - break; + return !$filters->has($required_value); case 'requiresConfiguration': $intersection = array_intersect($plugin->getConfiguration(), $required_value);
- Assigned to wim leers