Example scaffolding

You can use the following code to create an example.module which you can use to experiment with the examples in this guide.

// example.module
function example_menu($maycache) {
  if ($maycache) {
    $items[] = array(
      'path' => 'scratch/elements',
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
      'title' => t('Elements'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array('example_elements_form'),
    );
    return $items;
  }
}
; example.info
name = "Example"
description = "Quick scratch module."