Unverified Commit d3612415 authored by larowlan's avatar larowlan

Issue #2897979 by karthikkumarbodu, svetoslav.dragoev: image.module should use...

Issue #2897979 by karthikkumarbodu, svetoslav.dragoev: image.module should use FileInterface instead of File
parent c9039287
......@@ -7,7 +7,7 @@
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\file\Entity\File;
use Drupal\file\FileInterface;
use Drupal\field\FieldStorageConfigInterface;
use Drupal\field\FieldConfigInterface;
use Drupal\image\Entity\ImageStyle;
......@@ -210,7 +210,7 @@ function image_file_download($uri) {
/**
* Implements hook_file_move().
*/
function image_file_move(File $file, File $source) {
function image_file_move(FileInterface $file, FileInterface $source) {
// Delete any image derivatives at the original image path.
image_path_flush($source->getFileUri());
}
......@@ -218,7 +218,7 @@ function image_file_move(File $file, File $source) {
/**
* Implements hook_ENTITY_TYPE_predelete() for file entities.
*/
function image_file_predelete(File $file) {
function image_file_predelete(FileInterface $file) {
// Delete any image derivatives of this image.
image_path_flush($file->getFileUri());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment