MediaTestOembedServiceProvider.php
Same filename and directory in other branches
- 10 core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php
- 11.x core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php
- 9 core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php
- 8.9.x core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php
Namespace
Drupal\media_test_oembedFile
-
core/
modules/ media/ tests/ modules/ media_test_oembed/ src/ MediaTestOembedServiceProvider.php
View source
<?php
declare (strict_types=1);
namespace Drupal\media_test_oembed;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;
/**
* Replaces oEmbed-related media services with testing versions.
*/
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);
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| MediaTestOembedServiceProvider | Replaces oEmbed-related media services with testing versions. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.