function fancy_file_delete_batch_finished in Fancy File Delete 8
Batch finished.
1 string reference to 'fancy_file_delete_batch_finished'
- _fancy_file_delete_batch_run in ./
fancy_file_delete.module - The batch operations to run for either function.
File
- ./
fancy_file_delete.batch.inc, line 68 - Batch function.
Code
function fancy_file_delete_batch_finished($success, $results, $operations) {
if ($success) {
// Reset the cache.
\Drupal::entityTypeManager()
->getStorage('file')
->resetCache();
$message = \Drupal::translation()
->formatPlural(count($results), 'One file cleansed.', '@count files cleansed.');
}
else {
$message = t('Assimilation was futile!');
}
\Drupal::messager()
->addMessage($message);
return new RedirectResponse(Url::fromRoute('fancy_file_delete.info'));
}