function CKEditor5PluginManagerInterface::getProvidedElements

Same name in other branches
  1. 9 core/modules/ckeditor5/src/Plugin/CKEditor5PluginManagerInterface.php \Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface::getProvidedElements()
  2. 11.x core/modules/ckeditor5/src/Plugin/CKEditor5PluginManagerInterface.php \Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface::getProvidedElements()

Gets all supported elements for the given plugins and text editor.

Parameters

string[] $plugin_ids: (optional) An array of CKEditor 5 plugin IDs. When not set, gets elements for all plugins.

\Drupal\editor\EditorInterface|null $editor: (optional) A configured text editor object using CKEditor 5. When not set, plugins depending on the text editor cannot provide elements.

bool $resolve_wildcards: (optional) Whether to resolve wildcards. Defaults to TRUE. When set to FALSE, the raw allowed elements will be returned (with no processing applied hence no resolved wildcards).

bool $creatable_elements_only: (optional) Whether to retrieve only the creatable elements. Defaults to FALSE.

Return value

array A nested array with a structure as described in \Drupal\filter\Plugin\FilterInterface::getHTMLRestrictions().

Throws

\LogicException Thrown when an invalid CKEditor5PluginElementsSubsetInterface implementation is encountered.

See also

\Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::getCreatableElements()

\Drupal\filter\Plugin\FilterInterface::getHTMLRestrictions()

File

core/modules/ckeditor5/src/Plugin/CKEditor5PluginManagerInterface.php, line 129

Class

CKEditor5PluginManagerInterface
Provides the interface for a plugin manager of CKEditor 5 plugins.

Namespace

Drupal\ckeditor5\Plugin

Code

public function getProvidedElements(array $plugin_ids = [], ?EditorInterface $editor = NULL, bool $resolve_wildcards = TRUE, bool $creatable_elements_only = FALSE) : array;

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