You are here

protected function AuditFilesReferencedNotUsedBatchProcess::deleteDispatch in Audit Files 8.3

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

Processes entity reference deletions from content entities to file_managed.

Parameters

array $context: Batch context.

File

src/Batch/AuditFilesReferencedNotUsedBatchProcess.php, line 87

Class

AuditFilesReferencedNotUsedBatchProcess
Process batch files.

Namespace

Drupal\auditfiles\Batch

Code

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