batch_example_menu

6 batch_example.module batch_example_menu()
7 batch_example.module batch_example_menu()
8 batch_example.module batch_example_menu()

Implementation of hook_menu().

Related topics

File

batch_example/batch_example.module, line 40
This is an example outlining how a module can define batches.

Code

function batch_example_menu() {
  $items = array();
  $items['batch_example'] = array(
    'title' => 'Batch example', 
    'page callback' => 'drupal_get_form', 
    'page arguments' => array('batch_example_simple_form'), 
    'access callback' => TRUE,
  );
  $items['batch_example/example_1'] = array(
    'title' => 'Simple form', 
    'type' => MENU_DEFAULT_LOCAL_TASK, 
    'weight' => 0,
  );
  $items['batch_example/example_2'] = array(
    'title' => 'Multistep form', 
    'page callback' => 'drupal_get_form', 
    'page arguments' => array('batch_example_multistep_form'), 
    'access callback' => TRUE, 
    'type' => MENU_LOCAL_TASK, 
    'weight' => 1,
  );
  $items['batch_example/example_3'] = array(
    'title' => 'No form', 
    'page callback' => 'batch_example_page', 
    'access callback' => TRUE, 
    'type' => MENU_LOCAL_TASK, 
    'weight' => 2,
  );
  return $items;
}
Login or register to post comments