function ProviderRepository::get
Overrides ProviderRepository::get
File
- 
              core/
modules/ media/ tests/ modules/ media_test_oembed/ src/ ProviderRepository.php, line 26  
Class
- ProviderRepository
 - Overrides the oEmbed provider repository service for testing purposes.
 
Namespace
Drupal\media_test_oembedCode
public function get($provider_name) {
  $providers = \Drupal::state()->get(static::class, []);
  if (isset($providers[$provider_name])) {
    return $providers[$provider_name];
  }
  return parent::get($provider_name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.