function _social_post_mass_update_batch_finished in Open Social 8.3
Same name and namespace in other branches
- 8.9 modules/social_features/social_post/social_post.admin.inc \_social_post_mass_update_batch_finished()
- 8.4 modules/social_features/social_post/social_post.admin.inc \_social_post_mass_update_batch_finished()
- 8.5 modules/social_features/social_post/social_post.admin.inc \_social_post_mass_update_batch_finished()
- 8.6 modules/social_features/social_post/social_post.admin.inc \_social_post_mass_update_batch_finished()
- 8.7 modules/social_features/social_post/social_post.admin.inc \_social_post_mass_update_batch_finished()
- 8.8 modules/social_features/social_post/social_post.admin.inc \_social_post_mass_update_batch_finished()
- 10.3.x modules/social_features/social_post/social_post.admin.inc \_social_post_mass_update_batch_finished()
- 10.0.x modules/social_features/social_post/social_post.admin.inc \_social_post_mass_update_batch_finished()
- 10.1.x modules/social_features/social_post/social_post.admin.inc \_social_post_mass_update_batch_finished()
- 10.2.x modules/social_features/social_post/social_post.admin.inc \_social_post_mass_update_batch_finished()
Implements callback_batch_finished().
Reports the 'finished' status of batch operation for social_post_mass_update().
Parameters
bool $success: A boolean indicating whether the batch mass update operation successfully concluded.
string[] $results: An array of rendered links to posts updated via the batch mode process.
array $operations: An array of function calls (not used in this function).
See also
_social_post_mass_update_batch_process()
1 string reference to '_social_post_mass_update_batch_finished'
- social_post_mass_update in modules/
social_features/ social_post/ social_post.admin.inc - Updates all posts in the passed-in array with the passed-in field values.
File
- modules/
social_features/ social_post/ social_post.admin.inc, line 159 - Helper methods for post administration actions.
Code
function _social_post_mass_update_batch_finished($success, array $results, array $operations) {
if ($success) {
drupal_set_message(t('The update has been performed.'));
}
else {
drupal_set_message(t('An error occurred and processing did not complete.'), 'error');
$message = \Drupal::translation()
->formatPlural(count($results), '1 item successfully processed:', '@count items successfully processed:');
$item_list = [
'#theme' => 'item_list',
'#items' => $results,
];
$message .= \Drupal::service('renderer')
->render($item_list);
drupal_set_message($message);
}
}