You are here

interface FileMediaFormatterInterface in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterInterface.php \Drupal\file\Plugin\Field\FieldFormatter\FileMediaFormatterInterface

Defines getter methods for FileMediaFormatterBase.

This interface is used on the FileMediaFormatterBase class to ensure that each file media formatter will be based on a media type.

Abstract classes are not able to implement abstract static methods, this interface will work around that.

Hierarchy

Expanded class hierarchy of FileMediaFormatterInterface

All classes that implement FileMediaFormatterInterface

See also

\Drupal\file\Plugin\Field\FieldFormatter\FileMediaFormatterBase

File

core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterInterface.php, line 16

Namespace

Drupal\file\Plugin\Field\FieldFormatter
View source
interface FileMediaFormatterInterface {

  /**
   * Gets the applicable media type for a formatter.
   *
   * @return string
   *   The media type of this formatter.
   */
  public static function getMediaType();

}

Members

Namesort descending Modifiers Type Description Overrides
FileMediaFormatterInterface::getMediaType public static function Gets the applicable media type for a formatter. 2