summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/file/src/FileInterface.php
diff options
context:
space:
mode:
authorcatch <6915-catch@users.noreply.drupalcode.org>2025-03-05 12:33:24 +0000
committercatch <6915-catch@users.noreply.drupalcode.org>2025-03-05 12:33:24 +0000
commitc742c88182271fd58636dc80c652aa958ced82f0 (patch)
tree0e5ebb1abbcde053a2cb937eb69411a1f48182e8 /core/modules/file/src/FileInterface.php
parent9444e3830f9add0e8541f08d8712e98215b76509 (diff)
downloaddrupal-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.php9
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;
+
}