public function BlazyOEmbed::getResource in Blazy 8.2
Returns the oEmbed Resource based on the given media input url.
Parameters
string $input_url: The video url.
Return value
Drupal\media\OEmbed\Resource[] The oEmbed resource.
Overrides BlazyOEmbedInterface::getResource
1 call to BlazyOEmbed::getResource()
- BlazyOEmbed::getExternalImageItem in src/
BlazyOEmbed.php - Returns external image item from resource relevant to BlazyFilter.
File
- src/
BlazyOEmbed.php, line 134
Class
- BlazyOEmbed
- Provides OEmbed integration.
Namespace
Drupal\blazyCode
public function getResource($input_url) {
if (!isset($this->resource[hash('md2', $input_url)])) {
$resource_url = $this->urlResolver
->getResourceUrl($input_url, 0, 0);
$this->resource[hash('md2', $input_url)] = $this->resourceFetcher
->fetchResource($resource_url);
}
return $this->resource[hash('md2', $input_url)];
}