You are here

function opening_hours_menu in Opening hours 7

Same name and namespace in other branches
  1. 6 opening_hours.module \opening_hours_menu()

Implements hook_menu().

File

./opening_hours.module, line 10
Opening hours module.

Code

function opening_hours_menu() {
  $include_path = drupal_get_path('module', 'opening_hours') . '/includes';
  $items = array();
  $items['node/%node/opening_hours'] = array(
    'title' => 'Opening hours',
    'page callback' => 'opening_hours_node_edit_page',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'opening_hours_node_edit_access',
    'access arguments' => array(
      1,
    ),
    'weight' => 3,
    'file' => 'opening_hours.pages.inc',
    'file path' => $include_path,
    'type' => MENU_LOCAL_TASK,
  );
  $items['opening_hours/instances'] = array(
    'page callback' => 'opening_hours_crud_api_page',
    'access callback' => TRUE,
    'file' => 'opening_hours.pages.inc',
    'file path' => $include_path,
    'type' => MENU_CALLBACK,
  );
  $items['opening_hours/instances/%opening_hours_instance'] = array(
    'page callback' => 'opening_hours_instance_id_api_page',
    'page arguments' => array(
      2,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'edit opening hours for content',
    ),
    'file' => 'opening_hours.pages.inc',
    'file path' => $include_path,
    'type' => MENU_CALLBACK,
  );
  $items['admin/structure/opening_hours'] = array(
    'title' => 'Opening hours',
    'description' => 'Managed blocked days for the opening hours module.',
    'page callback' => 'opening_hours_admin_settings_page',
    'access arguments' => array(
      'administer opening hours configuration',
    ),
    'file' => 'opening_hours.admin.inc',
    'file path' => $include_path,
  );
  $items['admin/structure/opening_hours/blocked_day/add'] = array(
    'title' => 'Add blocked day',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'opening_hours_admin_blocked_day_add_form',
    ),
    'access arguments' => array(
      'administer opening hours configuration',
    ),
    'file' => 'opening_hours.admin.inc',
    'file path' => $include_path,
  );
  $items['admin/structure/opening_hours/blocked_day/%/delete'] = array(
    'title' => 'Delete blocked day',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'opening_hours_admin_blocked_day_delete_form',
      4,
    ),
    'access arguments' => array(
      'administer opening hours configuration',
    ),
    'file' => 'opening_hours.admin.inc',
    'file path' => $include_path,
  );
  return $items;
}