1 database_example.module database_example_menu()

Implements hook_menu().

Sets up calls to backdrop_get_form() for all our example cases.

Related topics

File

modules/examples/database_example/database_example.module, line 291
Hook implementations for the Database Example module.

Code

function database_example_menu() {
  $items = array();

  $items['examples/database'] = array(
    'title' => 'Database Example',
    'page callback' => 'database_example_list',
    'access callback' => TRUE,
  );
  $items['examples/database/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['examples/database/add'] = array(
    'title' => 'Add entry',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('database_example_form_add'),
    'access callback' => TRUE,
    'type' => MENU_LOCAL_TASK,
    'weight' => -9,
  );
  $items['examples/database/update'] = array(
    'title' => 'Update entry',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('database_example_form_update'),
    'type' => MENU_LOCAL_TASK,
    'access callback' => TRUE,
    'weight' => -5,
  );
  $items['examples/database/advanced'] = array(
    'title' => 'Advanced list',
    'page callback' => 'database_example_advanced_list',
    'access callback' => TRUE,
    'type' => MENU_LOCAL_TASK,
  );

  return $items;
}