You are here

public function AddFormBase::__construct in Drupal 9

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

Constructs an AddFormBase object.

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\media_library\OpenerResolverInterface $opener_resolver: The opener resolver.

2 calls to AddFormBase::__construct()
FileUploadForm::__construct in core/modules/media_library/src/Form/FileUploadForm.php
Constructs a new FileUploadForm.
OEmbedForm::__construct in core/modules/media_library/src/Form/OEmbedForm.php
Constructs a new OEmbedForm.
2 methods override AddFormBase::__construct()
FileUploadForm::__construct in core/modules/media_library/src/Form/FileUploadForm.php
Constructs a new FileUploadForm.
OEmbedForm::__construct in core/modules/media_library/src/Form/OEmbedForm.php
Constructs a new OEmbedForm.

File

core/modules/media_library/src/Form/AddFormBase.php, line 76

Class

AddFormBase
Provides a base class for creating media items from within the media library.

Namespace

Drupal\media_library\Form

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, MediaLibraryUiBuilder $library_ui_builder, OpenerResolverInterface $opener_resolver) {
  $this->entityTypeManager = $entity_type_manager;
  $this->libraryUiBuilder = $library_ui_builder;
  $this->viewBuilder = $this->entityTypeManager
    ->getViewBuilder('media');
  $this->openerResolver = $opener_resolver;
}