1 tabledrag_example.module tabledrag_example_menu()

Implements hook_menu().

We'll let backdrop_get_form() generate the form page for us, for both of these menu items.

See also

backdrop_get_form()

Related topics

File

modules/examples/tabledrag_example/tabledrag_example.module, line 22
An example of how to build a sortable form using tabledrag.

Code

function tabledrag_example_menu() {
  // Basic example with single-depth sorting.
  $items['examples/tabledrag_example_simple'] = array(
    'title' => 'TableDrag example (simple)',
    'description' => 'Show a page with a sortable tabledrag form',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('tabledrag_example_simple_form'),
    'access callback' => TRUE,
    'file' => 'tabledrag_example_simple_form.inc',
  );
  // Basic parent/child example.
  $items['examples/tabledrag_example_parent'] = array(
    'title' => 'TableDrag example (parent/child)',
    'description' => 'Show a page with a sortable parent/child tabledrag form',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('tabledrag_example_parent_form'),
    'access callback' => TRUE,
    'file' => 'tabledrag_example_parent_form.inc',
  );
  return $items;
}