You are here

public function OEmbedForm::__construct in Drupal 9

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

Constructs a new OEmbedForm.

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\OEmbed\UrlResolverInterface $url_resolver: The oEmbed URL resolver service.

\Drupal\media\OEmbed\ResourceFetcherInterface $resource_fetcher: The oEmbed resource fetcher service.

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

Overrides AddFormBase::__construct

File

core/modules/media_library/src/Form/OEmbedForm.php, line 53

Class

OEmbedForm
Creates a form to create media entities from oEmbed URLs.

Namespace

Drupal\media_library\Form

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, MediaLibraryUiBuilder $library_ui_builder, UrlResolverInterface $url_resolver, ResourceFetcherInterface $resource_fetcher, OpenerResolverInterface $opener_resolver = NULL) {
  parent::__construct($entity_type_manager, $library_ui_builder, $opener_resolver);
  $this->urlResolver = $url_resolver;
  $this->resourceFetcher = $resource_fetcher;
}