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