file-link.html.twig in Drupal 10
Same filename in this branch
- 10 core/modules/file/templates/file-link.html.twig
- 10 core/themes/starterkit_theme/templates/field/file-link.html.twig
- 10 core/themes/classy/templates/field/file-link.html.twig
- 10 core/themes/claro/templates/field/file-link.html.twig
- 10 core/themes/seven/templates/field/file-link.html.twig
- 10 core/themes/stable9/templates/field/file-link.html.twig
- 10 core/themes/stable/templates/field/file-link.html.twig
- 10 core/themes/bartik/templates/field/file-link.html.twig
- 10 core/profiles/demo_umami/themes/umami/templates/components/field/file-link.html.twig
Same filename and directory in other branches
Theme override for a link to a file.
Available variables:
- attributes: The HTML attributes for the containing element.
- link: A link to the file.
- icon: The icon image representing the file type.
- file_size: The size of the file.
5 theme calls to file-link.html.twig
- FileEntityFormatterTest::testFormatterFileLinkWithQueryString in core/
modules/ file/ tests/ src/ Kernel/ Formatter/ FileEntityFormatterTest.php - Tests the file_link field formatter using a query string.
- FileFieldDisplayTest::testNodeDisplay in core/
modules/ file/ tests/ src/ Functional/ FileFieldDisplayTest.php - Tests normal formatter display on node display.
- GenericFileFormatter::viewElements in core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ GenericFileFormatter.php - Builds a renderable array for a field value.
- ManagedFile::processManagedFile in core/
modules/ file/ src/ Element/ ManagedFile.php - Render API callback: Expands the managed_file element type.
- TableFormatter::viewElements in core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ TableFormatter.php - Builds a renderable array for a field value.
File
core/themes/classy/templates/field/file-link.html.twigView source
- {#
- /**
- * @file
- * Theme override for a link to a file.
- *
- * Available variables:
- * - attributes: The HTML attributes for the containing element.
- * - link: A link to the file.
- * - icon: The icon image representing the file type.
- * - file_size: The size of the file.
- *
- * @see template_preprocess_file_link()
- * @see stable_preprocess_image_widget()
- */
- #}
- {{ attach_library('classy/file') }}
- <span{{ attributes }}>{{ icon }} {{ link }}</span>