diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 5db5442..237f94f 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -10,7 +10,7 @@ */ use Drupal\node\Node; -use Drupal\Core\File\File; +use Drupal\file\File; use Drupal\entity\EntityInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; diff --git a/core/modules/file/file.api.php b/core/modules/file/file.api.php index 2edf4b1..5585855 100644 --- a/core/modules/file/file.api.php +++ b/core/modules/file/file.api.php @@ -174,7 +174,7 @@ function hook_file_delete(Drupal\file\File $file) { * The field to which the file belongs. * @param Drupal\entity\EntityInterface $entity * The entity which references the file. - * @param Drupal\Core\File\File $file + * @param Drupal\file\File $file * The file entity that is being requested. * * @return @@ -184,7 +184,7 @@ function hook_file_delete(Drupal\file\File $file) { * * @see hook_field_access(). */ -function hook_file_download_access($field, Drupal\entity\EntityInterface $entity, Drupal\Core\File\File $file) { +function hook_file_download_access($field, Drupal\entity\EntityInterface $entity, Drupal\file\File $file) { if ($entity->entityType() == 'node') { return node_access('view', $entity); } diff --git a/core/modules/file/tests/file_module_test.module b/core/modules/file/tests/file_module_test.module index 662d2b8..c9dd819 100644 --- a/core/modules/file/tests/file_module_test.module +++ b/core/modules/file/tests/file_module_test.module @@ -6,6 +6,7 @@ */ use Drupal\entity\EntityInterface; +use Drupal\file\File; /** * Implements hook_menu(). @@ -74,7 +75,7 @@ function file_module_test_form_submit($form, &$form_state) { /** * Implements hook_file_download_access(). */ -function file_module_test_file_download_access($field, EntityInterface $entity, $field_item) { +function file_module_test_file_download_access($field, EntityInterface $entity, File $file) { $instance = field_info_instance($entity->entityType(), $field['field_name'], $entity->bundle()); // Allow the file to be downloaded only if the given arguments are correct. // If any are wrong, $instance will be NULL.