Skip to content

Commit 81ff339

Browse files
ASU-1863: fix mediabank error
1 parent 95bae05 commit 81ff339

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

public/themes/custom/asuntotuotanto/asuntotuotanto.theme

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Drupal\Core\Url;
99
use Drupal\Core\Site\Settings;
1010
use Drupal\file\Entity\File;
11+
use Drupal\file\IconMimeTypes;
1112
use Drupal\paragraphs\Entity\Paragraph;
1213
use Drupal\Core\StringTranslation\ByteSizeMarkup;
1314
use Drupal\taxonomy\Entity\Term;
@@ -1096,7 +1097,7 @@ function asuntotuotanto_preprocess_file_link(&$variables) {
10961097
// File type.
10971098
$file = $variables['file'];
10981099
$mime_type = $file->getMimeType();
1099-
$variables['mime_type'] = file_icon_class($mime_type);
1100+
$variables['mime_type'] = IconMimeTypes::getIconClass($mime_type);
11001101
// File url.
11011102
/** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */
11021103
$file_url_generator = \Drupal::service('file_url_generator');

0 commit comments

Comments
 (0)