file-link.html.twig in Zircon Profile 8.0
Same filename in this branch
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
4 theme calls to file-link.html.twig
- FileFieldDisplayTest::testNodeDisplay in core/
modules/ file/ src/ Tests/ 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/modules/file/templates/file-link.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
- */
- #}
- <span{{ attributes }}>{{ link }}</span>