You are here

interface BlazyOEmbedInterface in Blazy 8.2

Provides OEmbed integration.

Hierarchy

Expanded class hierarchy of BlazyOEmbedInterface

All classes that implement BlazyOEmbedInterface

1 file declares its use of BlazyOEmbedInterface
BlazyFilter.php in src/Plugin/Filter/BlazyFilter.php

File

src/BlazyOEmbedInterface.php, line 8

Namespace

Drupal\blazy
View source
interface BlazyOEmbedInterface {

  /**
   * Returns the oEmbed Resource based on the given media input url.
   *
   * @param string $input_url
   *   The video url.
   *
   * @return Drupal\media\OEmbed\Resource[]
   *   The oEmbed resource.
   */
  public function getResource($input_url);

  /**
   * Builds media-related settings based on the given media input url.
   *
   * @param array $settings
   *   The settings array being modified.
   */
  public function build(array &$settings = []);

  /**
   * Provides the autoplay url suitable for lightboxes, or custom video trigger.
   *
   * @param string $url
   *   The embed URL, not input URL.
   *
   * @return array
   *   The settings array containing autoplay URL.
   */
  public function getAutoPlayUrl($url = '');

  /**
   * Gets the Media item thumbnail.
   *
   * @param array $data
   *   The modified array containing settings, and to be video thumbnail item.
   * @param object $media
   *   The core Media entity.
   */
  public function getMediaItem(array &$data, $media);

  /**
   * Gets the faked image item out of file entity, or ER, if applicable.
   *
   * @param object $file
   *   The expected file entity, or ER, to get image item from.
   *
   * @return array
   *   The array of image item and settings if a file image, else empty.
   *
   * @todo this is likely to be removed for anything Media, still kept for
   * BlazyFilter and few legacy file entity integrations such as Views file.
   */
  public function getImageItem($file);

}

Members

Namesort descending Modifiers Type Description Overrides
BlazyOEmbedInterface::build public function Builds media-related settings based on the given media input url. 1
BlazyOEmbedInterface::getAutoPlayUrl public function Provides the autoplay url suitable for lightboxes, or custom video trigger. 1
BlazyOEmbedInterface::getImageItem public function Gets the faked image item out of file entity, or ER, if applicable. 1
BlazyOEmbedInterface::getMediaItem public function Gets the Media item thumbnail. 1
BlazyOEmbedInterface::getResource public function Returns the oEmbed Resource based on the given media input url. 1