You are here

interface MediaEntityRendererInterface in Gutenberg 8

Same name and namespace in other branches
  1. 8.2 src/MediaEntityRendererInterface.php \Drupal\gutenberg\MediaEntityRendererInterface

Renders media entities.

@package Drupal\gutenberg

Hierarchy

Expanded class hierarchy of MediaEntityRendererInterface

All classes that implement MediaEntityRendererInterface

2 files declare their use of MediaEntityRendererInterface
MediaEntityBlockFilter.php in src/Plugin/Filter/MediaEntityBlockFilter.php
MediaService.php in src/Service/MediaService.php

File

src/MediaEntityRendererInterface.php, line 10

Namespace

Drupal\gutenberg
View source
interface MediaEntityRendererInterface {

  /**
   * Render media entities.
   *
   * @param \Drupal\media\Entity\Media|string $media_entity
   *   Media entity ID or loaded media entity instance.
   * @param string $view_mode
   *   (optional) View mode of media entity, 'full' is default.
   *
   * @return string
   *   Rendered HTML of the media entity.
   */
  public function render($media_entity, string $view_mode = 'full');

}

Members