You are here

public function CKEditor5Plugin::__construct in Drupal 10

Overridden for compatibility with the AnnotationBridgeDecorator, which ensures YAML-defined CKEditor 5 plugin definitions are also processed by annotations. Unfortunately it does not (yet) support nested annotations. Force YAML-defined plugin definitions to be parsed by the annotations, to ensure consistent handling of defaults.

Overrides Plugin::__construct

See also

\Drupal\Component\Annotation\Plugin\Discovery\AnnotationBridgeDecorator::getDefinitions()

File

core/modules/ckeditor5/src/Annotation/CKEditor5Plugin.php, line 57

Class

CKEditor5Plugin
Defines a CKEditor5Plugin annotation object.

Namespace

Drupal\ckeditor5\Annotation

Code

public function __construct($values) {
  if (isset($values['ckeditor5']) && is_array($values['ckeditor5'])) {
    $values['ckeditor5'] = new CKEditor5AspectsOfCKEditor5Plugin($values['ckeditor5']);
  }
  if (isset($values['drupal']) && is_array($values['drupal'])) {
    $values['drupal'] = new DrupalAspectsOfCKEditor5Plugin($values['drupal']);
  }
  parent::__construct($values);
}