Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / image / image.module
index 30358b90652cc207f6ff8e0e7224b9f67c10bb61..c1c216c0d198ae3434c8a755eeda8c8ad415b062 100644 (file)
@@ -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;
@@ -152,6 +152,9 @@ function image_theme() {
     'image_crop_summary' => [
       'variables' => ['data' => NULL, 'effect' => []],
     ],
+    'image_scale_and_crop_summary' => [
+      'variables' => ['data' => NULL, 'effect' => []],
+    ],
     'image_rotate_summary' => [
       'variables' => ['data' => NULL, 'effect' => []],
     ],
@@ -210,7 +213,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 +221,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());
 }