function MediaTestOembedServiceProvider::alter
Same name in other branches
- 8.9.x core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php \Drupal\media_test_oembed\MediaTestOembedServiceProvider::alter()
- 10 core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php \Drupal\media_test_oembed\MediaTestOembedServiceProvider::alter()
- 11.x core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php \Drupal\media_test_oembed\MediaTestOembedServiceProvider::alter()
Overrides ServiceProviderBase::alter
File
-
core/
modules/ media/ tests/ modules/ media_test_oembed/ src/ MediaTestOembedServiceProvider.php, line 16
Class
- MediaTestOembedServiceProvider
- Replaces oEmbed-related media services with testing versions.
Namespace
Drupal\media_test_oembedCode
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.