operations: (required) Array of operations to be performed, where each item is an array consisting of the name of an implementation of callback_batch_operation() and an array of parameter. Example:
*
title: A safe, translated string to use as the title for the progress page. Defaults to __('Processing').
*
init_message: Message displayed while the processing is initialized. Defaults to __('Initializing.').
*
progress_message: Message displayed while processing the batch. Available placeholders are %current% and %total%.
*
error_message: Message displayed if an error occurred while processing the batch. Defaults to __('An error has occurred.').
*
finished: Name of an implementation of callback_batch_finished(). This is executed after the batch has completed. This should be used to perform any result massaging that may be needed, and possibly save data in $_SESSION for display after final page redirection.
*
* Sample callback_batch_operation():
*
*
* function my_function_1($id, $text, &$context) {
* $context['results'][] = $text . $id;
* $context['message'] = 'Text + id ='.$text . $id;
* }
*
* The $context array gathers batch context information about the execution (read),
* as well as 'return values' for the current operation (write)
* The following keys are provided :
* 'results' (read / write): The array of results gathered so far by
* the batch processing, for the current operation to append its own.
* 'message' (write): A text message displayed in the progress page.
* The following keys allow for multi-step operations :
* 'sandbox' (read / write): An array that can be freely used to
* store persistent data between iterations. It is recommended to
* use this instead of $_SESSION, which is unsafe if the user
* continues browsing in a separate window while the batch is processing.
* 'finished' (write): A float number between 0 and 1 informing
* the processing engine of the completion level for the operation.
* 1 (or no value explicitly set) means the operation is finished
* and the batch processing can continue to the next operation.
*