Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UrlResolverInterface.php

function UrlResolverInterface::getResourceUrl

Builds the resource URL for a media asset URL.

Parameters

string $url: The media asset URL.

int $max_width: (optional) Maximum width of the oEmbed resource, in pixels.

int $max_height: (optional) Maximum height of the oEmbed resource, in pixels.

Return value

string Returns the resource URL corresponding to the given media item URL.

File

core/modules/media/src/OEmbed/UrlResolverInterface.php, line 43

Class

UrlResolverInterface
Defines the interface for the oEmbed URL resolver service.

Namespace

Drupal\media\OEmbed

Code

public function getResourceUrl($url, $max_width = NULL, $max_height = NULL);
RSS feed
Powered by Drupal