protected function AuditFilesUsedNotManagedBatchProcess::dispatch in Audit Files 8.3
Same name and namespace in other branches
- 4.x src/Batch/AuditFilesUsedNotManagedBatchProcess.php \Drupal\auditfiles\Batch\AuditFilesUsedNotManagedBatchProcess::dispatch()
Processes removal of files from file_managed that are not in file_usage.
Parameters
array $context: Batch context.
File
- src/
Batch/ AuditFilesUsedNotManagedBatchProcess.php, line 61
Class
- AuditFilesUsedNotManagedBatchProcess
- Batch Worker to remove files from file_usage not in file_managed table.
Namespace
Drupal\auditfiles\BatchCode
protected function dispatch(array &$context) {
$this->usedNotManaged
->auditfilesUsedNotManagedBatchDeleteProcessFile($this->fileId);
$context['results'][] = Html::escape($this->fileId);
$context['message'] = new TranslatableMarkup('Processed file ID %file_id.', [
'%file_id' => $this->fileId,
]);
}