function CKEditor4To5UpgradePluginInterface::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem
Same name in other branches
- 9 core/modules/ckeditor5/src/Plugin/CKEditor4To5UpgradePluginInterface.php \Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem()
- 11.x core/modules/ckeditor5/src/Plugin/CKEditor4To5UpgradePluginInterface.php \Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem()
Maps a CKEditor 4 button to the CKEditor 5 equivalent, if it exists.
Generated by inspecting all \Drupal\ckeditor\CKEditorPluginButtonsInterface implementations.
Parameters
string $cke4_button: A valid CKEditor 4 button name.
\Drupal\ckeditor5\HTMLRestrictions $text_format_html_restrictions: The restrictions of the text format, if this upgrade plugin needs to inspect the text format's HTML restrictions to make a decision.
Return value
string[]|null The equivalent CKEditor 5 toolbar items, or NULL if no equivalent exists. In either case, the button names must be added to the annotation.
Throws
\OutOfBoundsException Thrown when this plugin does not know whether an equivalent exists.
See also
\Drupal\ckeditor\CKEditorPluginButtonsInterface
\Drupal\ckeditor5\Annotation\CKEditor4To5Upgrade
2 methods override CKEditor4To5UpgradePluginInterface::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem()
- Contrib::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem in core/
modules/ ckeditor5/ src/ Plugin/ CKEditor4To5Upgrade/ Contrib.php - Maps a CKEditor 4 button to the CKEditor 5 equivalent, if it exists.
- Core::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem in core/
modules/ ckeditor5/ src/ Plugin/ CKEditor4To5Upgrade/ Core.php - Maps a CKEditor 4 button to the CKEditor 5 equivalent, if it exists.
File
-
core/
modules/ ckeditor5/ src/ Plugin/ CKEditor4To5UpgradePluginInterface.php, line 42
Class
- CKEditor4To5UpgradePluginInterface
- Defines an interface for CKEditor 4 to 5 upgrade plugins.
Namespace
Drupal\ckeditor5\PluginCode
public function mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem(string $cke4_button, HTMLRestrictions $text_format_html_restrictions) : ?array;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.