function image_module_test_file_download in Drupal 9
Same name and namespace in other branches
- 8 core/modules/image/tests/modules/image_module_test/image_module_test.module \image_module_test_file_download()
- 7 modules/image/tests/image_module_test.module \image_module_test_file_download()
File
- core/
modules/ image/ tests/ modules/ image_module_test/ image_module_test.module, line 10 - Provides Image module hook implementations for testing purposes.
Code
function image_module_test_file_download($uri) {
$default_uri = \Drupal::state()
->get('image.test_file_download', FALSE);
if ($default_uri == $uri) {
return [
'X-Image-Owned-By' => 'image_module_test',
];
}
}