function FileUploadForm::__construct

Same name in other branches
  1. 9 core/modules/media_library/src/Form/FileUploadForm.php \Drupal\media_library\Form\FileUploadForm::__construct()
  2. 8.9.x core/modules/media_library/src/Form/FileUploadForm.php \Drupal\media_library\Form\FileUploadForm::__construct()
  3. 10 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.

\Drupal\file\FileRepositoryInterface $file_repository: The file repository service.

Overrides AddFormBase::__construct

File

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

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, FileRepositoryInterface $file_repository) {
    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;
    $this->fileRepository = $file_repository;
}

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