Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FileAccessControlHandler.php

function 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

file_get_file_references()

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 96

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal