interface FileMediaFormatterInterface

Same name and namespace in other branches
  1. 8.9.x core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterInterface.php \Drupal\file\Plugin\Field\FieldFormatter\FileMediaFormatterInterface
  2. 10 core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterInterface.php \Drupal\file\Plugin\Field\FieldFormatter\FileMediaFormatterInterface
  3. 11.x 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

Title Sort descending Modifiers Object type Summary Overrides
FileMediaFormatterInterface::getMediaType public static function Gets the applicable media type for a formatter. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.