You are here

public static function AuditFilesManagedNotUsedBatchProcess::auditfilesManagedNotUsedBatchDeleteProcessBatch in Audit Files 4.x

Same name and namespace in other branches
  1. 8.3 src/Batch/AuditFilesManagedNotUsedBatchProcess.php \Drupal\auditfiles\Batch\AuditFilesManagedNotUsedBatchProcess::auditfilesManagedNotUsedBatchDeleteProcessBatch()

Batch process to delete file entities from file_managed not in file_usage.

Parameters

int $file_id: File entity ID to delete.

array $context: Batch context.

File

src/Batch/AuditFilesManagedNotUsedBatchProcess.php, line 49

Class

AuditFilesManagedNotUsedBatchProcess
Batch Worker to handle Deleting entity records from file_managed table.

Namespace

Drupal\auditfiles\Batch

Code

public static function auditfilesManagedNotUsedBatchDeleteProcessBatch($file_id, array &$context) {
  $managedNotUsed = \Drupal::service('auditfiles.managed_not_used');
  $worker = new static($managedNotUsed, $file_id);
  $worker
    ->dispatch($context);
}