function CKEditor5PluginDefinition::getDeriver

Same name in other branches
  1. 9 core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::getDeriver()
  2. 10 core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::getDeriver()

Overrides DerivablePluginDefinitionInterface::getDeriver

See also

\Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin::$deriver

File

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

Class

CKEditor5PluginDefinition
Provides an implementation of a CKEditor 5 plugin definition.

Namespace

Drupal\ckeditor5\Plugin

Code

public function getDeriver() {
    // TRICKY: this is the only key that is allowed to not be set, because it is
    // possible that this plugin definition is a partial/incomplete one, and the
    // default from the annotation is only applied automatically for class
    // annotation CKEditor 5 plugin definitions (because they create an instance
    // of the DrupalAspectsOfCKEditor5Plugin annotation level), not for CKEditor
    // 5 plugin definitions in YAML.
    // @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::processDefinition()
    // @see \Drupal\ckeditor5\Annotation\CKEditor5Plugin::__construct()
    return $this->drupal['deriver'] ?? NULL;
}

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