You are here

class MediaTestOembedServiceProvider in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php \Drupal\media_test_oembed\MediaTestOembedServiceProvider

Replaces oEmbed-related media services with testing versions.

Hierarchy

Expanded class hierarchy of MediaTestOembedServiceProvider

File

core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php, line 11

Namespace

Drupal\media_test_oembed
View source
class MediaTestOembedServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  public function alter(ContainerBuilder $container) {
    parent::alter($container);
    $container
      ->getDefinition('media.oembed.provider_repository')
      ->setClass(ProviderRepository::class);
    $container
      ->getDefinition('media.oembed.url_resolver')
      ->setClass(UrlResolver::class);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MediaTestOembedServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1