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;
'image_crop_summary' => [
'variables' => ['data' => NULL, 'effect' => []],
],
+ 'image_scale_and_crop_summary' => [
+ 'variables' => ['data' => NULL, 'effect' => []],
+ ],
'image_rotate_summary' => [
'variables' => ['data' => NULL, 'effect' => []],
],
/**
* 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());
}
/**
* 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());
}