You are here

public function CKEditor5PluginDefinition::getElements in Drupal 10

Gets the list of elements and attributes this plugin allows to create/edit.

Return value

string[] A list of elements and attributes.

Throws

\LogicException When called on a plugin definition that has no elements.

See also

\Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin::$elements

1 call to CKEditor5PluginDefinition::getElements()
CKEditor5PluginDefinition::getCreatableElements in core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php
Gets the elements this plugin allows to create.

File

core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php, line 455

Class

CKEditor5PluginDefinition
Provides an implementation of a CKEditor 5 plugin definition.

Namespace

Drupal\ckeditor5\Plugin

Code

public function getElements() : array {
  if (!$this
    ->hasElements()) {
    throw new \LogicException('::getElements() should only be called if ::hasElements() returns TRUE.');
  }
  return $this->drupal['elements'];
}