You are here

interface OEmbedResolverInterface in Gutenberg 8.2

Resolves oEmbed urls.

Hierarchy

Expanded class hierarchy of OEmbedResolverInterface

All classes that implement OEmbedResolverInterface

2 files declare their use of OEmbedResolverInterface
OEmbedProcessor.php in src/BlockProcessor/OEmbedProcessor.php
OEmbedProxyUrlController.php in src/Controller/OEmbedProxyUrlController.php

File

src/OEmbedResolverInterface.php, line 8

Namespace

Drupal\gutenberg
View source
interface OEmbedResolverInterface {

  /**
   * Resolve a URL's oEmbed resource.
   *
   * @param string $url
   *   The url to resolve an oEmbed for.
   * @param int $maxwidth
   *   The maximum width of the oEmbed resource.
   *
   * @return string|null
   *   The resolved oEmbed.
   */
  public function resolveOembed($url, $maxwidth);

  /**
   * Fetch oEmbed HTML from a remote resource.
   *
   * This is usually the provider URL.
   *
   * @param string $url
   *   The oEmbed resource.
   *
   * @return \Drupal\Component\Render\MarkupInterface|null
   *   The oEmbed HTML.
   */
  public function fetchOembedHtml($url);

  /**
   * Get the fallback provider URI.
   *
   * @return string
   *   The fallback provider URI.
   */
  public function getDefaultFallbackOembedProviderUri();

}

Members

Namesort descending Modifiers Type Description Overrides
OEmbedResolverInterface::fetchOembedHtml public function Fetch oEmbed HTML from a remote resource. 1
OEmbedResolverInterface::getDefaultFallbackOembedProviderUri public function Get the fallback provider URI. 1
OEmbedResolverInterface::resolveOembed public function Resolve a URL's oEmbed resource. 1