You are here

public function TestFileUsage::delete in Drupal 8

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

Removes a record to indicate that a module is no longer using a file.

Parameters

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

string $module: The name of the module using the file.

string $type: (optional) The type of the object that contains the referenced file. May be omitted if all module references to a file are being deleted. Defaults to NULL.

string $id: (optional) The unique ID of the object containing the referenced file. May be omitted if all module references to a file are being deleted. Defaults to NULL.

int $count: (optional) The number of references to delete from the object. Defaults to 1. Zero may be specified to delete all references to the file within a specific object.

Overrides FileUsageBase::delete

File

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

Class

TestFileUsage

Namespace

Drupal\service_provider_test

Code

public function delete(FileInterface $file, $module, $type = NULL, $id = NULL, $count = 1) {
}