diff options
author | catch <6915-catch@users.noreply.drupalcode.org> | 2025-03-05 12:33:24 +0000 |
---|---|---|
committer | catch <6915-catch@users.noreply.drupalcode.org> | 2025-03-05 12:33:24 +0000 |
commit | c742c88182271fd58636dc80c652aa958ced82f0 (patch) | |
tree | 0e5ebb1abbcde053a2cb937eb69411a1f48182e8 /core/modules/file/src/FileInterface.php | |
parent | 9444e3830f9add0e8541f08d8712e98215b76509 (diff) | |
download | drupal-c742c88182271fd58636dc80c652aa958ced82f0.tar.gz drupal-c742c88182271fd58636dc80c652aa958ced82f0.zip |
Issue #3494126 by ramprassad, karimb, nicxvan, kim.pepper, smustgrave, berdir: Move file_get_content_headers() to a method on the file entity
Diffstat (limited to 'core/modules/file/src/FileInterface.php')
-rw-r--r-- | core/modules/file/src/FileInterface.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/modules/file/src/FileInterface.php b/core/modules/file/src/FileInterface.php index 588009cb475b..efa6627790fe 100644 --- a/core/modules/file/src/FileInterface.php +++ b/core/modules/file/src/FileInterface.php @@ -142,4 +142,13 @@ interface FileInterface extends ContentEntityInterface, EntityChangedInterface, */ public function getCreatedTime(); + /** + * Examines a file entity and returns content headers for download. + * + * @return array + * An associative array of headers, as expected by + * \Symfony\Component\HttpFoundation\StreamedResponse. + */ + public function getDownloadHeaders(): array; + } |