You are here

public function FileUploadForm::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media_library/src/Form/FileUploadForm.php \Drupal\media_library\Form\FileUploadForm::__construct()

Constructs a new FileUploadForm.

Parameters

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

\Drupal\media_library\MediaLibraryUiBuilder $library_ui_builder: The media library UI builder.

\Drupal\Core\Render\ElementInfoManagerInterface $element_info: The element info manager.

\Drupal\Core\Render\RendererInterface $renderer: The renderer service.

\Drupal\Core\File\FileSystemInterface $file_system: The file system service.

\Drupal\media_library\OpenerResolverInterface $opener_resolver: The opener resolver.

\Drupal\file\FileUsage\FileUsageInterface $file_usage: The file usage service.

Overrides AddFormBase::__construct

File

core/modules/media_library/src/Form/FileUploadForm.php, line 80

Class

FileUploadForm
Creates a form to create media entities from uploaded files.

Namespace

Drupal\media_library\Form

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, MediaLibraryUiBuilder $library_ui_builder, ElementInfoManagerInterface $element_info, RendererInterface $renderer, FileSystemInterface $file_system, OpenerResolverInterface $opener_resolver, FileUsageInterface $file_usage) {
  parent::__construct($entity_type_manager, $library_ui_builder, $opener_resolver);
  $this->elementInfo = $element_info;
  $this->renderer = $renderer;
  $this->fileSystem = $file_system;
  $this->fileUsage = $file_usage;
}