public static function PathautoAdminDelete::batchFinished in Pathauto 8
Batch finished callback.
File
- src/
Form/ PathautoAdminDelete.php, line 178
Class
- PathautoAdminDelete
- Alias mass delete form.
Namespace
Drupal\pathauto\FormCode
public static function batchFinished($success, $results, $operations) {
if ($success) {
if ($results['delete_all']) {
\Drupal::service('messenger')
->addMessage(t('All of your automatically generated path aliases have been deleted.'));
}
elseif (isset($results['deletions'])) {
foreach (array_values($results['deletions']) as $label) {
\Drupal::service('messenger')
->addMessage(t('All of your automatically generated %label path aliases have been deleted.', [
'%label' => $label,
]));
}
}
}
else {
$error_operation = reset($operations);
\Drupal::service('messenger')
->addMessage(t('An error occurred while processing @operation with arguments : @args', [
'@operation' => $error_operation[0],
'@args' => print_r($error_operation[0]),
]));
}
}