function tabledrag_example_menu in Examples for Developers 7
Implements hook_menu().
We'll let drupal_get_form() generate the form page for us, for both of these menu items.
See also
Related topics
File
- tabledrag_example/
tabledrag_example.module, line 34 - 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' => 'drupal_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' => 'drupal_get_form',
'page arguments' => array(
'tabledrag_example_parent_form',
),
'access callback' => TRUE,
'file' => 'tabledrag_example_parent_form.inc',
);
return $items;
}