media-audio-file-formatter.html.twig in Media entity audio 8.2
Same filename and directory in other branches
Default theme implementation for a link to a file.
Available variables:
- attributes: The HTML attributes for the containing element.
- link: A link to the file.
See also
1 theme call to media-audio-file-formatter.html.twig
- AudioPlayerHTML5::viewElements in src/
Plugin/ Field/ FieldFormatter/ AudioPlayerHTML5.php - Builds a renderable array for a field value.
File
templates/media-audio-file-formatter.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation for a link to a file.
- *
- * Available variables:
- * - attributes: The HTML attributes for the containing element.
- * - link: A link to the file.
- *
- * @see template_preprocess_file_link()
- *
- * @ingroup themeable
- */
- #}
- <audio {{ extravalue }}>
- <source src="{{ media_link }}" type="{{ mimetype }}">
- </audio>
- {% if value %}
- <a href="{{ media_link }}" target="_blank" download>{{ 'Download'|t }}</a>
- {% endif %}