You are here

function _taxonomy_menu_save_menu_links_finished in Taxonomy menu 7.2

Same name and namespace in other branches
  1. 8 taxonomy_menu.batch.inc \_taxonomy_menu_save_menu_links_finished()

Batch 'finished' callback.

1 string reference to '_taxonomy_menu_save_menu_links_finished'
_taxonomy_menu_save_menu_links_batch in ./taxonomy_menu.batch.inc
Saves link items in a menu based on available taxonomy terms.

File

./taxonomy_menu.batch.inc, line 82
Batch API Code.

Code

function _taxonomy_menu_save_menu_links_finished($success, $results, $operations) {
  if ($success) {
    $message = count($results) . ' taxonomy terms were processed.</br>';
    $message .= t('The Taxonomy menu has been created.');
  }
  else {

    // An error occurred.
    // $operations contains the operations that remained unprocessed.
    $error_operation = reset($operations);
    $message = t('An error occurred while processing %error_operation with arguments: @arguments', array(
      '%error_operation' => $error_operation[0],
      '@arguments' => print_r($error_operation[1], TRUE),
    ));
  }

  // Clear cache after saving menu links.
  menu_cache_clear_all();
}