You are here

function weather_es_menu in Weather_es 6

Same name and namespace in other branches
  1. 5 weather_es.module \weather_es_menu()
  2. 6.3 weather_es.module \weather_es_menu()
  3. 6.2 weather_es.module \weather_es_menu()
  4. 7 weather_es.module \weather_es_menu()

Implementation of hook_menu().

File

./weather_es.module, line 58
Non-displayable characters.

Code

function weather_es_menu($may_cache) {
  global $user;
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/weather_es',
      'title' => t('Weather_es'),
      'description' => t('Configure the system weather_es block.'),
      'callback' => 'weather_es_main',
      'callback arguments' => array(
        0,
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/settings/weather_es/edit',
      'title' => t('Weather_es'),
      'description' => t('Configure the system weather_es block'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'weather_es_configuration',
        0,
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/settings/weather_es/delete',
      'title' => t('Delete a location'),
      'description' => t('Delete a location from the system weather_es block'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'weather_es_confirm_delete',
        0,
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'user/' . $user->uid . '/weather_es',
      'title' => t('My weather_es'),
      'description' => t('Configure your custom weather_es block.'),
      'callback' => 'weather_es_main',
      'callback arguments' => array(
        $user->uid,
      ),
      'access' => user_access('administer custom weather_es block'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'user/' . $user->uid . '/weather_es/edit',
      'title' => t('Edit my weather_es'),
      'description' => t('Configure your custom weather_es block'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'weather_es_configuration',
        $user->uid,
      ),
      'access' => user_access('administer custom weather_es block'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'user/' . $user->uid . '/weather_es/delete',
      'title' => t('Delete a location from my weather_es'),
      'description' => t('Delete a location from my weather_es block'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'weather_es_confirm_delete',
        $user->uid,
      ),
      'access' => user_access('administer custom weather_es block'),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}