function CKEditor4To5UpgradePluginInterface::computeCKEditor5PluginSubsetConfiguration

Same name in other branches
  1. 10 core/modules/ckeditor5/src/Plugin/CKEditor4To5UpgradePluginInterface.php \Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface::computeCKEditor5PluginSubsetConfiguration()
  2. 11.x core/modules/ckeditor5/src/Plugin/CKEditor4To5UpgradePluginInterface.php \Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface::computeCKEditor5PluginSubsetConfiguration()

Computes elements subset configuration for CKEditor 5 plugin.

Every CKEditor 5 plugin that implements the elements subset interface must implement this as well, to ensure a smooth upgrade path.

Parameters

string $cke5_plugin_id: The CKEditor 5 plugin whose subset configuration needs to be computed.

\Drupal\filter\FilterFormatInterface $text_format: The text format based on whose restrictions this should be computed.

Return value

array|null NULL if not needed, otherwise a configuration array (which can itself be a subset of the default configuration of this CKEditor 5 plugin: perhaps only some of the configuration values determine the subset).

Throws

\OutOfBoundsException Thrown when no upgrade path exists.

\LogicException Thrown when a plugin claims to provide an upgrade path but does not.

See also

\Drupal\ckeditor5\Plugin\CKEditor5PluginElementsSubsetInterface

\Drupal\ckeditor5\Annotation\CKEditor4To5Upgrade

2 methods override CKEditor4To5UpgradePluginInterface::computeCKEditor5PluginSubsetConfiguration()
Contrib::computeCKEditor5PluginSubsetConfiguration in core/modules/ckeditor5/src/Plugin/CKEditor4To5Upgrade/Contrib.php
Computes elements subset configuration for CKEditor 5 plugin.
Core::computeCKEditor5PluginSubsetConfiguration in core/modules/ckeditor5/src/Plugin/CKEditor4To5Upgrade/Core.php
Computes elements subset configuration for CKEditor 5 plugin.

File

core/modules/ckeditor5/src/Plugin/CKEditor4To5UpgradePluginInterface.php, line 95

Class

CKEditor4To5UpgradePluginInterface
Defines an interface for CKEditor 4 to 5 upgrade plugins.

Namespace

Drupal\ckeditor5\Plugin

Code

public function computeCKEditor5PluginSubsetConfiguration(string $cke5_plugin_id, FilterFormatInterface $text_format) : ?array;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.