You are here

public function TestFileUsage::listUsage in Drupal 8

Same name in this branch
  1. 8 core/modules/file/tests/src/Unit/LegacyFileTest.php \Drupal\Tests\file\Unit\TestFileUsage::listUsage()
  2. 8 core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php \Drupal\service_provider_test\TestFileUsage::listUsage()
Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php \Drupal\service_provider_test\TestFileUsage::listUsage()
  2. 10 core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php \Drupal\service_provider_test\TestFileUsage::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.

Overrides FileUsageInterface::listUsage

File

core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php, line 25

Class

TestFileUsage

Namespace

Drupal\service_provider_test

Code

public function listUsage(FileInterface $file) {
}