MediaTestOembedServiceProvider.php
Same filename in other branches
Namespace
Drupal\media_test_oembedFile
-
core/
modules/ media/ tests/ modules/ media_test_oembed/ src/ MediaTestOembedServiceProvider.php
View source
<?php
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.