class MediaTestOembedServiceProvider
Same name 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
- 11.x 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 \Drupal\Core\DependencyInjection\ServiceProviderInterface, \Drupal\Core\DependencyInjection\ServiceModifierInterface
- class \Drupal\media_test_oembed\MediaTestOembedServiceProvider extends \Drupal\Core\DependencyInjection\ServiceProviderBase
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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | 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 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.