You are here

protected function AuditFilesNotOnServerBatchProcess::dispatch in Audit Files 8.3

Same name and namespace in other branches
  1. 4.x src/Batch/AuditFilesNotOnServerBatchProcess.php \Drupal\auditfiles\Batch\AuditFilesNotOnServerBatchProcess::dispatch()

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

Parameters

array $context: Batch context.

File

src/Batch/AuditFilesNotOnServerBatchProcess.php, line 64

Class

AuditFilesNotOnServerBatchProcess
Process batch files.

Namespace

Drupal\auditfiles\Batch

Code

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