function openlayers_ui_menu in Openlayers 6.2
Same name and namespace in other branches
- 7.3 modules/openlayers_ui/openlayers_ui.module \openlayers_ui_menu()
- 7.2 modules/openlayers_ui/openlayers_ui.module \openlayers_ui_menu()
Implementation of hook_menu
File
- modules/
openlayers_ui/ openlayers_ui.module, line 56
Code
function openlayers_ui_menu() {
$items = array();
// Core OpenLayers settings pages.
$items['admin/build/openlayers'] = array(
'title' => 'OpenLayers',
'description' => 'Manage maps, layers, styles, and map behaviors.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_admin_settings',
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/build/openlayers/settings'] = array(
'title' => 'Settings',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -20,
);
// Layers.
$items['admin/build/openlayers/layers'] = array(
'title' => 'Layers',
'page callback' => 'openlayers_ui_object_list',
'page arguments' => array(
3,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.layers.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
$items['admin/build/openlayers/layers/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -20,
);
// Layer type drilldown
$items['admin/build/openlayers/layers/add'] = array(
'title' => 'Add',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_layers_types',
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.layers.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
// Actual add-layer form
$items['admin/build/openlayers/layers/add/%openlayers_layer_type'] = array(
'title' => 'Add',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_layers_form',
5,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.layers.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -15,
);
$items['admin/build/openlayers/layers/clone/%openlayers_layer'] = array(
'title' => 'Clone layer',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_layers_form',
5,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.layers.inc',
'type' => MENU_NORMAL_ITEM,
'tab_parent' => 'admin/build/openlayers/layers',
);
$items['admin/build/openlayers/layers/import'] = array(
'title' => 'Import',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_layers_import_form',
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.layers.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
// Edit-layer form
$items['admin/build/openlayers/layers/%openlayers_layer/edit'] = array(
'title' => 'Edit layer',
'description' => 'Edit OpenLayers layer.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_layers_form',
4,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.layers.inc',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/build/openlayers/layers/%openlayers_layer_export/delete'] = array(
'title' => 'Delete layer',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_object_delete',
3,
4,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.layers.inc',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/build/openlayers/layers/%openlayers_layer_export/export'] = array(
'title' => 'Export layer',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_object_export',
3,
4,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.layers.inc',
'type' => MENU_NORMAL_ITEM,
);
// Layer-type-wide settings form
$items['admin/build/openlayers/layers/settings'] = array(
'title' => 'API Keys',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_layers_settings',
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.layers.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
// Styles.
$items['admin/build/openlayers/styles'] = array(
'title' => 'Styles',
'page callback' => 'openlayers_ui_object_list',
'page arguments' => array(
3,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.styles.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
$items['admin/build/openlayers/styles/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -20,
);
$items['admin/build/openlayers/styles/add'] = array(
'title' => 'Add',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_styles_form',
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.styles.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
/*
* Feature not completed
$items['admin/build/openlayers/styles/import'] = array(
'title' => 'Import',
'page callback' => 'drupal_get_form',
'page arguments' => array('openlayers_ui_styles_import_form'),
'access arguments' => array('administer openlayers'),
'file' => 'includes/openlayers_ui.styles.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
*/
$items['admin/build/openlayers/styles/add/%openlayers_style'] = array(
'title' => 'Add',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_styles_form',
5,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.styles.inc',
'type' => MENU_NORMAL_ITEM,
'weight' => -10,
);
$items['admin/build/openlayers/styles/clone/%openlayers_style'] = array(
'title' => 'Clone style',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_styles_form',
5,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.styles.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/openlayers/styles/%openlayers_style/edit'] = array(
'title' => 'Edit style',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_styles_form',
4,
TRUE,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.styles.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/openlayers/styles/%openlayers_style/delete'] = array(
'title' => 'Delete style',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_object_delete',
3,
4,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.styles.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/openlayers/styles/%openlayers_style/export'] = array(
'title' => 'Export style',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_object_export',
3,
4,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.styles.inc',
'type' => MENU_LOCAL_TASK,
);
// Presets.
$items['admin/build/openlayers/presets'] = array(
'title' => 'Presets',
'description' => 'Create OpenLayers map presets.',
'page callback' => 'openlayers_ui_object_list',
'page arguments' => array(
3,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.presets.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
$items['admin/build/openlayers/presets/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -20,
);
$items['admin/build/openlayers/presets/add'] = array(
'title' => 'Add',
'description' => 'Add OpenLayers map preset.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_presets_form',
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.presets.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
$items['admin/build/openlayers/presets/add/%openlayers_preset'] = array(
'title' => 'Clone Preset',
'description' => 'Add OpenLayers map preset.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_presets_form',
5,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.presets.inc',
'type' => MENU_NORMAL_ITEM,
'weight' => -10,
);
$items['admin/build/openlayers/presets/clone/%openlayers_preset'] = array(
'title' => 'Clone preset',
'description' => 'Clone OpenLayers map preset.',
'page callback' => 'openlayers_ui_presets_clone',
'page arguments' => array(
5,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.presets.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/openlayers/presets/%openlayers_preset/edit'] = array(
'title' => 'Edit preset',
'description' => 'Edit OpenLayers map preset.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_presets_form',
4,
TRUE,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.presets.inc',
'type' => MENU_LOCAL_TASK,
'tab_parent' => 'admin/build/openlayers/presets',
);
$items['admin/build/openlayers/presets/%openlayers_preset/delete'] = array(
'title' => 'Delete preset',
'description' => 'Delete OpenLayers map preset.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_object_delete',
3,
4,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.presets.inc',
'type' => MENU_LOCAL_TASK,
'tab_parent' => 'admin/build/openlayers/presets',
);
$items['admin/build/openlayers/presets/%openlayers_preset/export'] = array(
'title' => 'Export preset',
'description' => 'Export OpenLayers map preset.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'openlayers_ui_object_export',
3,
4,
),
'access arguments' => array(
'administer openlayers',
),
'file' => 'includes/openlayers_ui.presets.inc',
'type' => MENU_LOCAL_TASK,
'tab_parent' => 'admin/build/openlayers/presets',
);
$items['openlayers/ahah/preset'] = array(
'title' => 'OpenLayers AHAH',
'page callback' => 'openlayers_ui_preset_ahah',
'access callback' => TRUE,
'file' => 'includes/openlayers_ui.presets.inc',
'type' => MENU_CALLBACK,
);
$items['openlayers/ahah/style_plugin/%'] = array(
'title' => 'OpenLayers Style Plugin AHAH',
'page callback' => 'openlayers_ui_style_plugin_ahah',
'page arguments' => array(
3,
),
// 3rd url item (the '%') is first arg
'access callback' => TRUE,
'file' => 'includes/openlayers_ui.styles.inc',
'type' => MENU_CALLBACK,
);
return $items;
}