function FileAccessControlHandler::getFileReferences
Same name in other branches
- 8.9.x core/modules/file/src/FileAccessControlHandler.php \Drupal\file\FileAccessControlHandler::getFileReferences()
- 10 core/modules/file/src/FileAccessControlHandler.php \Drupal\file\FileAccessControlHandler::getFileReferences()
- 11.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.
See also
1 call to FileAccessControlHandler::getFileReferences()
- FileAccessControlHandler::checkAccess in core/
modules/ file/ src/ FileAccessControlHandler.php - Performs access checks.
File
-
core/
modules/ file/ src/ FileAccessControlHandler.php, line 90
Class
- FileAccessControlHandler
- Provides a File access control handler.
Namespace
Drupal\fileCode
protected function getFileReferences(FileInterface $file) {
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.