You are here

class MediaMigrationTestOembedServiceProvider in Media Migration 8

Replaces oEmbed-related media services which would make outbound requests.

Hierarchy

Expanded class hierarchy of MediaMigrationTestOembedServiceProvider

File

tests/modules/media_migration_test_oembed/src/MediaMigrationTestOembedServiceProvider.php, line 11

Namespace

Drupal\media_migration_test_oembed
View source
class MediaMigrationTestOembedServiceProvider extends ServiceProviderBase {

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

}

Members

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