function asaf_example_menu in Asaf (ajax submit for any form) 7
Same name and namespace in other branches
- 8 modules/asaf_example/asaf_example.module \asaf_example_menu()
Implements hook_menu().
Sets up calls to drupal_get_form() for all our example cases.
See also
menu_example.module for more details on hook_menu().
File
- modules/
asaf_example/ asaf_example.module, line 15 - AJAX Examples module file with basic examples.
Code
function asaf_example_menu() {
$items = array();
$items['examples/asaf_example'] = array(
'title' => 'ASAF Example',
'page callback' => 'asaf_example_intro',
'access callback' => TRUE,
'expanded' => TRUE,
);
$items['examples/asaf_example/gui/simplest'] = array(
'title' => 'Simplest (GUI)',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'asaf_example_gui_simplest',
),
'access callback' => TRUE,
'file' => 'asaf_example.gui.simplest.inc',
);
$items['examples/asaf_example/gui/buttons'] = array(
'title' => 'Buttons (GUI)',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'asaf_example_gui_buttons',
),
'access callback' => TRUE,
'file' => 'asaf_example.gui.buttons.inc',
);
$items['examples/asaf_example/api/simplest'] = array(
'title' => 'Simplest (API)',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'asaf_example_api_simplest',
),
'access callback' => TRUE,
'file' => 'asaf_example.api.simplest.inc',
);
$items['examples/asaf_example/api/needed-files'] = array(
'title' => 'Needed files (API)',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'asaf_example_api_needed_files',
),
'access callback' => TRUE,
'weight' => 0,
'file' => 'asaf_example.api.needed_files.inc',
);
$items['examples/asaf_example/api/depended-elements'] = array(
'title' => 'Depended Elements (API)',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'asaf_example_api_depended_elements',
),
'access callback' => TRUE,
'weight' => 0,
'file' => 'asaf_example.api.depended_elements.inc',
);
$items['examples/asaf_example/api/areas'] = array(
'title' => 'Renderable Areas (API)',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'asaf_example_api_areas',
),
'access callback' => TRUE,
'weight' => 0,
'file' => 'asaf_example.api.areas.inc',
);
/*
* Some of the examples not so interesting but important for the autotests placed in tests/ folder
*/
$items['examples/asaf_example/gui/needed-files'] = array(
'title' => 'Needed files (GUI)',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'asaf_example_gui_needed_files',
),
'access callback' => TRUE,
'weight' => 0,
'file' => 'tests/asaf_example.gui.needed_files.inc',
);
return $items;
}