function FileUsageInterface::listUsage

Same name in other branches
  1. 9 core/modules/file/src/FileUsage/FileUsageInterface.php \Drupal\file\FileUsage\FileUsageInterface::listUsage()
  2. 8.9.x core/modules/file/src/FileUsage/FileUsageInterface.php \Drupal\file\FileUsage\FileUsageInterface::listUsage()
  3. 10 core/modules/file/src/FileUsage/FileUsageInterface.php \Drupal\file\FileUsage\FileUsageInterface::listUsage()

Determines where a file is used.

Parameters

\Drupal\file\FileInterface $file: A file entity.

Return value

array A nested array with usage data. The first level is keyed by module name, the second by object type and the third by the object id. The value of the third level contains the usage count.

2 methods override FileUsageInterface::listUsage()
DatabaseFileUsageBackend::listUsage in core/modules/file/src/FileUsage/DatabaseFileUsageBackend.php
Determines where a file is used.
TestFileUsage::listUsage in core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php
Determines where a file is used.

File

core/modules/file/src/FileUsage/FileUsageInterface.php, line 68

Class

FileUsageInterface
File usage backend interface.

Namespace

Drupal\file\FileUsage

Code

public function listUsage(FileInterface $file);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.