You are here

public function AddFormBase::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media_library/src/Form/AddFormBase.php \Drupal\media_library\Form\AddFormBase::__construct()
  2. 9 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.

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;
}