You are here

protected function AuditFilesUsedNotReferencedBatchProcess::dispatch in Audit Files 8.3

Processes file removal from file_usage that are not referenced in content.

Parameters

array $context: Batch context.

File

src/Batch/AuditFilesUsedNotReferencedBatchProcess.php, line 61

Class

AuditFilesUsedNotReferencedBatchProcess
Process batch files.

Namespace

Drupal\auditfiles\Batch

Code

protected function dispatch(array &$context) {
  $this->usedNotReferenced
    ->auditfilesUsedNotReferencedBatchDeleteProcessFile($this->fileId);
  $context['results'][] = Html::escape($this->fileId);
  $context['message'] = new TranslatableMarkup('Processed file ID %file_id.', [
    '%file_id' => $this->fileId,
  ]);
}