function FileAccessControlHandler::getFileReferences
Same name and namespace in other branches
- 10 core/modules/file/src/FileAccessControlHandler.php \Drupal\file\FileAccessControlHandler::getFileReferences()
- 11.x core/modules/file/src/FileAccessControlHandler.php \Drupal\file\FileAccessControlHandler::getFileReferences()
- 9 core/modules/file/src/FileAccessControlHandler.php \Drupal\file\FileAccessControlHandler::getFileReferences()
- 8.9.x core/modules/file/src/FileAccessControlHandler.php \Drupal\file\FileAccessControlHandler::getFileReferences()
Wrapper for file_get_file_references().
Parameters
\Drupal\file\FileInterface $file: The file object for which to get references.
Return value
array A multidimensional array. The keys are field_name, entity_type, entity_id and the value is an entity referencing this file.
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(\Drupal\file\FileReferenceResolver::class) instead.
See also
https://www.drupal.org/node/3573884
File
-
core/
modules/ file/ src/ FileAccessControlHandler.php, line 111
Class
- FileAccessControlHandler
- Provides a File access control handler.
Namespace
Drupal\fileCode
protected function getFileReferences(FileInterface $file) {
@trigger_error(__METHOD__ . ' is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \\Drupal::service(\\Drupal\\file\\FileReferenceResolver::class) instead. See https://www.drupal.org/node/3573884', E_USER_DEPRECATED);
return file_get_file_references($file, NULL, EntityStorageInterface::FIELD_LOAD_REVISION, NULL);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.