batch_example_simple_form

Versions
6 – 7
batch_example_simple_form()

Test 1 : Simple form

Code

developer/examples/batch_example.module, line 67

<?php
function batch_example_simple_form() {
  $form['batch'] = array(
    '#type' => 'select',
    '#title' => 'Choose batch',
    '#options' => array(
      'batch_1' => 'batch 1 - load a node 100 times',
      'batch_2' => 'batch 2 - load all nodes, 20 times')
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Go',
  );

  return $form;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.