FileAccessControlHandler::getFileReferences

protected FileAccessControlHandler::getFileReferences(FileInterface $file)

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

file_get_file_references()

File

core/modules/file/src/FileAccessControlHandler.php, line 74

Class

FileAccessControlHandler
Provides a File access control handler.

Namespace

Drupal\file

Code

protected function getFileReferences(FileInterface $file) {
  return file_get_file_references($file, NULL, EntityStorageInterface::FIELD_LOAD_REVISION, NULL);
}
doc_Drupal
2016-10-29 09:13:20
Comments
Leave a Comment

Please login to continue.