class MediaTestOembedServiceProvider in Drupal 8
Same name and namespace in other branches
- 9 core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php \Drupal\media_test_oembed\MediaTestOembedServiceProvider
- 10 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
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\media_test_oembed\MediaTestOembedServiceProvider
Expanded class hierarchy of MediaTestOembedServiceProvider
File
- core/
modules/ media/ tests/ modules/ media_test_oembed/ src/ MediaTestOembedServiceProvider.php, line 11
Namespace
Drupal\media_test_oembedView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MediaTestOembedServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |
|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |