You are here

MediaEntityRendererInterface.php in Gutenberg 8

Same filename and directory in other branches
  1. 8.2 src/MediaEntityRendererInterface.php

Namespace

Drupal\gutenberg

File

src/MediaEntityRendererInterface.php
View source
<?php

namespace Drupal\gutenberg;


/**
 * Renders media entities.
 *
 * @package Drupal\gutenberg
 */
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');

}

Interfaces

Namesort descending Description
MediaEntityRendererInterface Renders media entities.