function Endpoint::buildResourceUrl
Builds and returns the endpoint URL.
In most situations this function should not be used. Your are probably looking for \Drupal\media\OEmbed\UrlResolver::getResourceUrl(), because it is alterable and also cached.
Parameters
string $url: The canonical media URL.
Return value
string URL of the oEmbed endpoint.
See also
\Drupal\media\OEmbed\UrlResolver::getResourceUrl()
File
-
core/
modules/ media/ src/ OEmbed/ Endpoint.php, line 177
Class
- Endpoint
- Value object for oEmbed provider endpoints.
Namespace
Drupal\media\OEmbedCode
public function buildResourceUrl($url) {
$query = [
'url' => $url,
];
return $this->getUrl() . '?' . UrlHelper::buildQuery($query);
}