You are here

public function CKEditor4To5UpgradePluginInterface::computeCKEditor5PluginSubsetConfiguration in Drupal 10

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

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;