You are here

function _taxonomy_menu_batch_update_context in Taxonomy menu 7

Same name and namespace in other branches
  1. 6.2 taxonomy_menu.batch.inc \_taxonomy_menu_batch_update_context()

Update the batch context

Parameters

array $context: Batch context array.

int $end: The end point of the most recent pass.

int $total: The total number of items to process in this batch.

str $msg: Message for the progress bar.

See also

_taxonomy_menu_insert_link_items_process().

1 call to _taxonomy_menu_batch_update_context()
_taxonomy_menu_insert_link_items_process in ./taxonomy_menu.batch.inc
Batch operation callback function: inserts 10 menu link items.

File

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

Code

function _taxonomy_menu_batch_update_context(&$context, $end, $total, $msg) {
  if ($end > $total) {
    $context['finished'] = 1;
    return;
  }
  $context['message'] = "{$msg}: {$end} of {$total}";
  $context['sandbox']['progress'] = $end;
  $context['finished'] = $end / $total;
}