You are here

public static function AuditFilesBatchProcess::auditfilesMergeFileReferencesBatchMergeProcessBatch in Audit Files 8.2

The batch process for deleting the file.

Parameters

int $file_being_kept: The file ID of the file to merge the other into.

int $file_being_merged: The file ID of the file to merge.

array $context: Used by the Batch API to keep track of and pass data from one operation to the next.

File

src/AuditFilesBatchProcess.php, line 263

Class

AuditFilesBatchProcess
Process batch files.

Namespace

Drupal\auditfiles

Code

public static function auditfilesMergeFileReferencesBatchMergeProcessBatch($file_being_kept, $file_being_merged, array &$context) {
  \Drupal::service('auditfiles.merge_file_references')
    ->auditfilesMergeFileReferencesBatchMergeProcessFile($file_being_kept, $file_being_merged);
  $context['results'][] = $file_being_merged;
  $context['message'] = t('Merged file ID %file_being_merged into file ID %file_being_kept.', [
    '%file_being_kept' => $file_being_kept,
    '%file_being_merged' => $file_being_merged,
  ]);
}