You are here

function uc_file_menu in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_file/uc_file.module \uc_file_menu()
  2. 7.3 uc_file/uc_file.module \uc_file_menu()

Implements hook_menu().

File

uc_file/uc_file.module, line 49

Code

function uc_file_menu() {
  $items = array();
  $items['_autocomplete_file'] = array(
    'page callback' => '_uc_file_autocomplete_filename',
    'access arguments' => array(
      'administer product features',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/store/products/files'] = array(
    'title' => 'View file downloads',
    'description' => 'View all file download features on products.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_file_admin_files_form',
    ),
    'access arguments' => array(
      'administer products',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_file.admin.inc',
  );
  $items['user/%user/purchased-files'] = array(
    'title' => 'Files',
    'description' => 'View your purchased files.',
    'page callback' => 'uc_file_user_downloads',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'uc_file_user_access',
    'access arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_file.pages.inc',
  );
  $items['download/%/%'] = array(
    'page callback' => '_uc_file_download',
    'page arguments' => array(
      1,
      2,
    ),
    'access arguments' => array(
      'download file',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_file.pages.inc',
  );
  return $items;
}