function CKEditor5PluginManager::getPlugin

Same name and namespace in other branches
  1. 11.x core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getPlugin()

File

core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php, line 118

Class

CKEditor5PluginManager
Provides a CKEditor 5 plugin manager.

Namespace

Drupal\ckeditor5\Plugin

Code

public function getPlugin(string $plugin_id, ?EditorInterface $editor) : CKEditor5PluginInterface {
  $configuration = $editor ? self::getPluginConfiguration($editor, $plugin_id) : [];
  return $this->createInstance($plugin_id, $configuration);
}

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