function UrlResolver::getResourceUrl
Same name in this branch
- 11.x core/modules/media/src/OEmbed/UrlResolver.php \Drupal\media\OEmbed\UrlResolver::getResourceUrl()
Same name in other branches
- 9 core/modules/media/src/OEmbed/UrlResolver.php \Drupal\media\OEmbed\UrlResolver::getResourceUrl()
- 9 core/modules/media/tests/modules/media_test_oembed/src/UrlResolver.php \Drupal\media_test_oembed\UrlResolver::getResourceUrl()
- 8.9.x core/modules/media/src/OEmbed/UrlResolver.php \Drupal\media\OEmbed\UrlResolver::getResourceUrl()
- 8.9.x core/modules/media/tests/modules/media_test_oembed/src/UrlResolver.php \Drupal\media_test_oembed\UrlResolver::getResourceUrl()
- 10 core/modules/media/src/OEmbed/UrlResolver.php \Drupal\media\OEmbed\UrlResolver::getResourceUrl()
- 10 core/modules/media/tests/modules/media_test_oembed/src/UrlResolver.php \Drupal\media_test_oembed\UrlResolver::getResourceUrl()
Overrides UrlResolver::getResourceUrl
File
-
core/
modules/ media/ tests/ modules/ media_test_oembed/ src/ UrlResolver.php, line 31
Class
- UrlResolver
- Overrides the oEmbed URL resolver service for testing purposes.
Namespace
Drupal\media_test_oembedCode
public function getResourceUrl($url, $max_width = NULL, $max_height = NULL) {
$urls = \Drupal::state()->get(static::class, []);
if (isset($urls[$url])) {
return $urls[$url];
}
return parent::getResourceUrl($url, $max_width, $max_height);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.