FileMediaFormatterInterface.php

Same filename in other branches
  1. 9 core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterInterface.php
  2. 8.9.x core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterInterface.php
  3. 11.x core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterInterface.php

Namespace

Drupal\file\Plugin\Field\FieldFormatter

File

core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterInterface.php

View source
<?php

namespace Drupal\file\Plugin\Field\FieldFormatter;


/**
 * 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.
 *
 * @see \Drupal\file\Plugin\Field\FieldFormatter\FileMediaFormatterBase
 */
interface FileMediaFormatterInterface {
    
    /**
     * Gets the applicable media type for a formatter.
     *
     * @return string
     *   The media type of this formatter.
     */
    public static function getMediaType();

}

Interfaces

Title Deprecated Summary
FileMediaFormatterInterface Defines getter methods for FileMediaFormatterBase.

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