function CKEditor4To5UpgradePluginInterface::mapCKEditor4SettingsToCKEditor5Configuration
Same name in other branches
- 9 core/modules/ckeditor5/src/Plugin/CKEditor4To5UpgradePluginInterface.php \Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface::mapCKEditor4SettingsToCKEditor5Configuration()
- 11.x core/modules/ckeditor5/src/Plugin/CKEditor4To5UpgradePluginInterface.php \Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface::mapCKEditor4SettingsToCKEditor5Configuration()
Maps CKEditor 4 settings to the CKEditor 5 equivalent, if needed.
Not every CKEditor 5 plugin has settings; some CKEditor 5 plugins may have settings that the CKEditor 4 equivalent did not and vice versa. Therefore the complete CKEditor 4 settings are provided, and any CKEditor 5 setting can be set.
Parameters
string $cke4_plugin_id: The CKEditor 4 plugin whose settings need to be mapped.
array $cke4_plugin_settings: The settings for this CKEditor 4 plugin.
Return value
array|null NULL if not needed, otherwise an array with a single key-value pair:
- key: the plugin ID of the equivalent CKEditor 5 plugin
- value: the equivalent settings
In either case, the button name must be added to the annotation.
Throws
\OutOfBoundsException Thrown when this plugin does not know whether an equivalent exists.
See also
\Drupal\ckeditor\CKEditorPluginConfigurableInterface
\Drupal\ckeditor5\Annotation\CKEditor4To5Upgrade
2 methods override CKEditor4To5UpgradePluginInterface::mapCKEditor4SettingsToCKEditor5Configuration()
- Contrib::mapCKEditor4SettingsToCKEditor5Configuration in core/
modules/ ckeditor5/ src/ Plugin/ CKEditor4To5Upgrade/ Contrib.php - Maps CKEditor 4 settings to the CKEditor 5 equivalent, if needed.
- Core::mapCKEditor4SettingsToCKEditor5Configuration in core/
modules/ ckeditor5/ src/ Plugin/ CKEditor4To5Upgrade/ Core.php - Maps CKEditor 4 settings to the CKEditor 5 equivalent, if needed.
File
-
core/
modules/ ckeditor5/ src/ Plugin/ CKEditor4To5UpgradePluginInterface.php, line 69
Class
- CKEditor4To5UpgradePluginInterface
- Defines an interface for CKEditor 4 to 5 upgrade plugins.
Namespace
Drupal\ckeditor5\PluginCode
public function mapCKEditor4SettingsToCKEditor5Configuration(string $cke4_plugin_id, array $cke4_plugin_settings) : ?array;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.