You are here

public function MediaDevelGenerate::__construct in Media entity 8

Constructs MediaDevelGenerate class.

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 definition.

\Drupal\media_entity\MediaStorageInterface $media_storage: The media storage.

\Drupal\Core\Entity\EntityStorageInterface $user_storage: The user storage.

\Drupal\Core\Entity\EntityStorageInterface $media_bundle_storage: The media bundle storage.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The url generator service.

\Drupal\Core\Datetime\DateFormatter $date_formatter: The date formatter service.

File

src/Plugin/DevelGenerate/MediaDevelGenerate.php, line 115

Class

MediaDevelGenerate
Provides a MediaDevelGenerate plugin.

Namespace

Drupal\media_entity\Plugin\DevelGenerate

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, MediaStorageInterface $media_storage, EntityStorageInterface $user_storage, EntityStorageInterface $media_bundle_storage, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, UrlGeneratorInterface $url_generator, DateFormatter $date_formatter) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->moduleHandler = $module_handler;
  $this->mediaStorage = $media_storage;
  $this->mediaBundleStorage = $media_bundle_storage;
  $this->userStorage = $user_storage;
  $this->languageManager = $language_manager;
  $this->urlGenerator = $url_generator;
  $this->dateFormatter = $date_formatter;
}