commerce-file-download-link.html.twig in Commerce File 8.2
Theme implementation for a file download link provided by commerce_file
Available variables:
- attributes: The HTML attributes for the containing element.
- link: A link to the file.
- file_size: The size of the file.
1 theme call to commerce-file-download-link.html.twig
- FileDownloadLinkFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ FileDownloadLinkFormatter.php - Builds a renderable array for a field value.
File
templates/commerce-file-download-link.html.twigView source
- {#
- /**
- * @file
- * Theme implementation for a file download link provided by commerce_file
- *
- * Available variables:
- * - attributes: The HTML attributes for the containing element.
- * - link: A link to the file.
- * - file_size: The size of the file.
- *
- * @see template_preprocess_commerce_file_download_link()
- *
- * @ingroup themeable
- */
- #}
- <span{{ attributes }}>{{ link }}</span>
- {% if file_size %}
- {# @todo remove class before Drupal 9.0.0 #}
- <span class="file-size">({{ file_size }})</span>
- {% endif %}