function uc_file_menu in Ubercart 7.3
Same name and namespace in other branches
- 5 uc_file/uc_file.module \uc_file_menu()
- 6.2 uc_file/uc_file.module \uc_file_menu()
Implements hook_menu().
File
- uc_file/
uc_file.module, line 32 - Allows products to be associated with downloadable files.
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',
),
'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,
),
'access arguments' => array(
'download file',
),
'type' => MENU_CALLBACK,
'file' => 'uc_file.pages.inc',
);
return $items;
}