function UrlResolver::setEndpointUrl
Sets the endpoint URL for an oEmbed resource URL.
Parameters
string $url: The resource URL.
string $endpoint_url: The endpoint URL.
1 call to UrlResolver::setEndpointUrl()
- OEmbedFormatterTest::testRender in core/
modules/ media/ tests/ src/ Functional/ FieldFormatter/ OEmbedFormatterTest.php  - Tests the oEmbed field formatter.
 
File
- 
              core/
modules/ media/ tests/ modules/ media_test_oembed/ src/ UrlResolver.php, line 20  
Class
- UrlResolver
 - Overrides the oEmbed URL resolver service for testing purposes.
 
Namespace
Drupal\media_test_oembedCode
public static function setEndpointUrl($url, $endpoint_url) {
  $urls = \Drupal::state()->get(static::class, []);
  $urls[$url] = $endpoint_url;
  \Drupal::state()->set(static::class, $urls);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.