You are here

function date_copy_menu in Date 5

Same name and namespace in other branches
  1. 5.2 date_copy/date_copy.module \date_copy_menu()
  2. 6 date_copy/date_copy.module \date_copy_menu()

Implementation of hook_menu()

File

./date_copy.module, line 24

Code

function date_copy_menu($may_cache) {
  $items = array();
  if (!$may_cache) {
    $items[] = array(
      'path' => 'admin/content/date',
      'title' => t('Date Import/Export'),
      'description' => t('Import and export date data.'),
      'access' => user_access('administer nodes'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'date_copy_import_ical_form',
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/content/date/import',
      'title' => t('Import'),
      'access' => user_access('administer nodes'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'date_copy_import_ical_form',
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => 1,
    );
    $items[] = array(
      'path' => 'admin/content/date/export',
      'title' => t('Export'),
      'access' => user_access('administer nodes'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'date_copy_export_form',
      'type' => MENU_LOCAL_TASK,
      'weight' => 2,
    );
    $items[] = array(
      'path' => 'admin/content/date/import/ical',
      'title' => t('iCal'),
      'access' => user_access('administer nodes'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'date_copy_import_ical_form',
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => 1,
    );
    $items[] = array(
      'path' => 'admin/content/date/import/event',
      'title' => t('Events'),
      'access' => user_access('administer nodes'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'date_copy_import_event_form',
      'type' => MENU_LOCAL_TASK,
      'weight' => 2,
    );
    $items[] = array(
      'path' => 'admin/content/date/import/csv',
      'title' => t('CSV'),
      'access' => user_access('administer nodes'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'date_copy_import_csv_form',
      'type' => MENU_LOCAL_TASK,
      'weight' => 3,
    );
    return $items;
  }
}