FileAudioFormatter.php

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

Namespace

Drupal\file\Plugin\Field\FieldFormatter

File

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

View source
<?php

namespace Drupal\file\Plugin\Field\FieldFormatter;


/**
 * Plugin implementation of the 'file_audio' formatter.
 *
 * @FieldFormatter(
 *   id = "file_audio",
 *   label = @Translation("Audio"),
 *   description = @Translation("Display the file using an HTML5 audio tag."),
 *   field_types = {
 *     "file"
 *   }
 * )
 */
class FileAudioFormatter extends FileMediaFormatterBase {
    
    /**
     * {@inheritdoc}
     */
    public static function getMediaType() {
        return 'audio';
    }

}

Classes

Title Deprecated Summary
FileAudioFormatter Plugin implementation of the 'file_audio' formatter.

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