_node_mass_update_batch_finished

_node_mass_update_batch_finished($success, $results, $operations)

Implements callback_batch_finished().

Reports the 'finished' status of batch operation for node_mass_update().

Parameters

bool $success: A boolean indicating whether the batch mass update operation successfully concluded.

string[] $results: An array of rendered links to nodes updated via the batch mode process.

array $operations: An array of function calls (not used in this function).

See also

_node_mass_update_batch_process()

File

core/modules/node/node.admin.inc, line 164
Content administration and module settings user interface.

Code

function _node_mass_update_batch_finished($success, $results, $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 = array(
      '#theme' => 'item_list',
      '#items' => $results,
    );
    $message .= drupal_render($item_list);
    drupal_set_message($message);
  }
}
doc_Drupal
2016-10-29 09:57:17
Comments
Leave a Comment

Please login to continue.