batch_example_simple_form_submit

6 batch_example.module batch_example_simple_form_submit($form, &$form_state)
7 batch_example.module batch_example_simple_form_submit($form, &$form_state)
8 batch_example.module batch_example_simple_form_submit($form, &$form_state)

Related topics

File

batch_example/batch_example.module, line 77
Outlines how a module can use the Batch API.

Code

function batch_example_simple_form_submit($form, &$form_state) {
  $function = 'batch_example_' . $form_state['values']['batch'];

  $_SESSION['http_request_count'] = 0; // reset counter for debug information.

  // Execute the function named batch_example_1 or batch_example_2.
  $batch = $function();
  batch_set($batch);
}
Login or register to post comments