function MediaLibrary::__construct

Same name in other branches
  1. 10 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\MediaLibrary::__construct()
  2. 11.x core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\MediaLibrary::__construct()

MediaLibrary constructor.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

\Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition $plugin_definition: The plugin implementation definition.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

Overrides CKEditor5PluginDefault::__construct

File

core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php, line 48

Class

MediaLibrary
CKEditor 5 Media Library plugin.

Namespace

Drupal\ckeditor5\Plugin\CKEditor5Plugin

Code

public function __construct(array $configuration, string $plugin_id, CKEditor5PluginDefinition $plugin_definition, EntityTypeManagerInterface $entity_type_manager) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->mediaTypeStorage = $entity_type_manager->getStorage('media_type');
}

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