function getdirections_menu in Get Directions 6
Same name and namespace in other branches
- 6.2 getdirections.module \getdirections_menu()
- 7.3 getdirections.module \getdirections_menu()
- 7.2 getdirections.module \getdirections_menu()
Implementation of hook_menu().
File
- ./
getdirections.module, line 39 - Fetches google map directions.
Code
function getdirections_menu() {
$items = array();
$items['admin/settings/getdirections'] = array(
'title' => 'Get directions',
'description' => 'Configure Get directions',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'getdirections_settings_form',
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'getdirections.admin.inc',
);
$items['getdirections'] = array(
'title' => 'Get directions',
'access arguments' => array(
'access gmap getdirections',
),
'page callback' => 'getdirections_direction',
'type' => MENU_SUGGESTED_ITEM,
);
if (module_exists('location')) {
$items['getdirections/location/%getdirections_fromto/%getdirections_id'] = array(
'title' => 'Get directions',
'access arguments' => array(
'access gmap getdirections',
),
'page callback' => 'getdirections_setlocation',
'page arguments' => array(
2,
3,
),
'type' => MENU_CALLBACK,
);
$items['getdirections/locations/%getdirections_id/%getdirections_id'] = array(
'title' => 'Get directions',
'access arguments' => array(
'access gmap getdirections',
),
'page callback' => 'getdirections_setlocations',
'page arguments' => array(
2,
3,
),
'type' => MENU_CALLBACK,
);
$items['getdirections/locations_via/%getdirections_via'] = array(
'title' => 'Get directions',
'access arguments' => array(
'access gmap getdirections',
),
'page callback' => 'getdirections_setlocations_via',
'page arguments' => array(
2,
),
'type' => MENU_CALLBACK,
);
$items['getdirections/location_user/%getdirections_fromto/%getdirections_uid'] = array(
'title' => 'Get directions',
'access arguments' => array(
'access gmap getdirections',
),
'page callback' => 'getdirections_user_setlocation',
'page arguments' => array(
2,
3,
),
'type' => MENU_CALLBACK,
);
$items['getdirections/locations_user/%getdirections_uid/%getdirections_uid'] = array(
'title' => 'Get directions',
'access arguments' => array(
'access gmap getdirections',
),
'page callback' => 'getdirections_user_setlocations',
'page arguments' => array(
2,
3,
),
'type' => MENU_CALLBACK,
);
$items['getdirections/location_n2u/%getdirections_id/%getdirections_uid'] = array(
'title' => 'Get directions',
'access arguments' => array(
'access gmap getdirections',
),
'page callback' => 'getdirections_n2u_setlocation',
'page arguments' => array(
2,
3,
),
'type' => MENU_CALLBACK,
);
$items['getdirections/location_u2n/%getdirections_uid/%getdirections_id'] = array(
'title' => 'Get directions',
'access arguments' => array(
'access gmap getdirections',
),
'page callback' => 'getdirections_u2n_setlocation',
'page arguments' => array(
2,
3,
),
'type' => MENU_CALLBACK,
);
$items['getdirections/locations_user_via/%getdirections_via'] = array(
'title' => 'Get directions',
'access arguments' => array(
'access gmap getdirections',
),
'page callback' => 'getdirections_user_setlocations_via',
'page arguments' => array(
2,
),
'type' => MENU_CALLBACK,
);
}
return $items;
}