You are here

function date_api_menu in Date 6.2

Same name and namespace in other branches
  1. 8 date_api/date_api.module \date_api_menu()
  2. 5.2 date_api.module \date_api_menu()
  3. 7.3 date_api/date_api.module \date_api_menu()
  4. 7.2 date_api/date_api.module \date_api_menu()

Implementation of hook_menu().

File

./date_api.module, line 54
This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.

Code

function date_api_menu() {
  $items = array();
  $items['admin/settings/date-time/formats'] = array(
    'title' => 'Formats',
    'description' => 'Allow users to configure date formats',
    'type' => MENU_LOCAL_TASK,
    'file' => 'date_api.admin.inc',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'date_api_date_formats_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'weight' => 1,
  );
  $items['admin/settings/date-time/formats/configure'] = array(
    'title' => 'Configure',
    'description' => 'Allow users to configure date formats',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'file' => 'date_api.admin.inc',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'date_api_date_formats_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'weight' => 1,
  );
  $items['admin/settings/date-time/formats/lookup'] = array(
    'title' => 'Date and time lookup',
    'type' => MENU_CALLBACK,
    'page callback' => 'date_api_date_time_lookup',
    'access arguments' => array(
      'administer site configuration',
    ),
  );
  $items['admin/settings/date-time/formats/custom'] = array(
    'title' => 'Custom formats',
    'description' => 'Allow users to configure custom date formats.',
    'type' => MENU_LOCAL_TASK,
    'file' => 'date_api.admin.inc',
    'page callback' => 'date_api_configure_custom_date_formats',
    'access arguments' => array(
      'administer site configuration',
    ),
    'weight' => 2,
  );
  $items['admin/settings/date-time/formats/add'] = array(
    'title' => 'Add format',
    'description' => 'Allow users to add additional date formats.',
    'type' => MENU_LOCAL_TASK,
    'file' => 'date_api.admin.inc',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'date_api_add_date_formats_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'weight' => 3,
  );
  $items['admin/settings/date-time/formats/delete/%'] = array(
    'title' => 'Delete date format',
    'description' => 'Allow users to delete a configured date format.',
    'type' => MENU_CALLBACK,
    'file' => 'date_api.admin.inc',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'date_api_delete_format_form',
      5,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
  );
  $items['admin/settings/date-time/delete/%'] = array(
    'title' => 'Delete date format type',
    'description' => 'Allow users to delete a configured date format type.',
    'type' => MENU_CALLBACK,
    'file' => 'date_api.admin.inc',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'date_api_delete_format_type_form',
      4,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
  );
  return $items;
}