function DrupalMediaLibrary::__construct

Same name in other branches
  1. 9 core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalMediaLibrary.php \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalMediaLibrary::__construct()

Constructs a new DrupalMediaLibrary plugin object.

Parameters

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

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Drupal\Core\Extension\ModuleExtensionList $extension_list_module: The module extension list.

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

File

core/modules/media_library/src/Plugin/CKEditorPlugin/DrupalMediaLibrary.php, line 56

Class

DrupalMediaLibrary
Defines the "drupalmedialibrary" plugin.

Namespace

Drupal\media_library\Plugin\CKEditorPlugin

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleExtensionList $extension_list_module, EntityTypeManagerInterface $entity_type_manager) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->moduleExtensionList = $extension_list_module;
    $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.