function weather_menu in Weather 6.5
Same name and namespace in other branches
- 5.6 weather.module \weather_menu()
- 5 weather.module \weather_menu()
- 7.3 weather.module \weather_menu()
- 7 weather.module \weather_menu()
- 7.2 weather.module \weather_menu()
Implementation of hook_menu().
File
- ./
weather.module, line 69 - Display <acronym title="METeorological Aerodrome Report">METAR</acronym> weather data from anywhere in the world
Code
function weather_menu() {
$items['admin/settings/weather'] = array(
'title' => 'Weather',
'description' => 'Configure system-wide weather blocks and the default configuration for new locations.',
'page callback' => 'weather_admin_main_page',
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_NORMAL_ITEM,
);
$items['admin/settings/weather/edit/%/%'] = array(
'title' => 'Edit location',
'description' => 'Configure a system-wide weather block.',
'page callback' => 'weather_custom_block',
'page arguments' => array(
4,
5,
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_CALLBACK,
);
$items['admin/settings/weather/delete/%/%'] = array(
'title' => 'Delete location',
'description' => 'Delete a location from a system-wide weather block.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'weather_custom_block_delete_confirm',
4,
5,
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_CALLBACK,
);
$items['admin/settings/weather/default'] = array(
'title' => 'Default configuration',
'description' => 'Setup the default configuration for new locations.',
'page callback' => 'weather_custom_block',
'page arguments' => array(
'0',
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_CALLBACK,
);
$items['user/%/weather'] = array(
'title' => 'My weather',
'description' => 'Configure your custom weather block.',
'page callback' => 'weather_user_main_page',
'page arguments' => array(
1,
),
'access callback' => 'weather_custom_block_access',
'access arguments' => array(
1,
),
'type' => MENU_LOCAL_TASK,
);
$items['user/%/weather/edit/%'] = array(
'title' => 'Edit location',
'description' => 'Configure your custom weather block.',
'page callback' => 'weather_custom_block',
'page arguments' => array(
1,
4,
),
'access callback' => 'weather_custom_block_access',
'access arguments' => array(
1,
),
'type' => MENU_CALLBACK,
);
$items['user/%/weather/delete/%'] = array(
'title' => 'Delete location',
'description' => 'Delete a location from your custom weather block.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'weather_custom_block_delete_confirm',
1,
4,
),
'access callback' => 'weather_custom_block_access',
'access arguments' => array(
1,
),
'type' => MENU_CALLBACK,
);
$items['weather/js'] = array(
'page callback' => 'weather_js',
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
$items['weather'] = array(
'title' => 'Weather',
'description' => 'Search for locations and display their current weather.',
'page callback' => 'weather_search_location',
'access arguments' => array(
'access weather pages',
),
'type' => MENU_NORMAL_ITEM,
);
$items['weather/autocomplete'] = array(
'page callback' => 'weather_search_autocomplete',
'access arguments' => array(
'access weather pages',
),
'type' => MENU_CALLBACK,
);
return $items;
}