function OEmbedForm::__construct

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

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