function file_icon_map
Same name in other branches
- 7.x modules/file/file.module \file_icon_map()
- 9 core/modules/file/file.module \file_icon_map()
- 8.9.x core/modules/file/file.module \file_icon_map()
Determines the generic icon MIME package based on a file's MIME type.
Parameters
string $mime_type: A MIME type.
Return value
string|false The generic icon MIME package expected for this file.
@deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use \Drupal\file\IconMimeTypes::getGenericMimeType() instead.
See also
https://www.drupal.org/node/3411269
1 call to file_icon_map()
- LegacyFileModuleTest::testFileIconMapDeprecation in core/
modules/ file/ tests/ src/ Kernel/ LegacyFileModuleTest.php - @covers ::file_icon_map
File
-
core/
modules/ file/ file.module, line 1317
Code
function file_icon_map($mime_type) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use \\Drupal\\file\\IconMimeTypes::getGenericMimeType() instead. See https://www.drupal.org/node/3411269', E_USER_DEPRECATED);
return IconMimeTypes::getGenericMimeType($mime_type);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.