You are here

function uc_store_menu in Ubercart 7.3

Same name and namespace in other branches
  1. 5 uc_store/uc_store.module \uc_store_menu()
  2. 6.2 uc_store/uc_store.module \uc_store_menu()

Implements hook_menu().

File

uc_store/uc_store.module, line 160
Contains global Ubercart functions and store administration functionality.

Code

function uc_store_menu() {
  $items = array();
  $items['admin/store'] = array(
    'title' => 'Store',
    'description' => 'Administer orders, products, customers, store settings, etc.',
    'page callback' => 'uc_store_admin',
    'access callback' => 'uc_store_admin_access',
    'weight' => -12,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/reports'] = array(
    'title' => 'Reports',
    'description' => 'Browse various store reports.',
    'page callback' => 'uc_store_reports',
    'access arguments' => array(
      'view reports',
    ),
    'weight' => 2,
    'file' => 'uc_store.admin.inc',
    'position' => 'right',
  );
  $items['admin/store/settings'] = array(
    'title' => 'Configuration',
    'description' => 'Adjust configuration settings for Ubercart.',
    'page callback' => 'uc_store_configuration_page',
    'access arguments' => array(
      'administer store',
    ),
    'weight' => 6,
    'file' => 'uc_store.admin.inc',
    'position' => 'right',
  );
  $items['admin/store/settings/countries'] = array(
    'title' => 'Countries and addresses',
    'description' => 'Manage available countries and configure address formats.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_country_import_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'file' => 'uc_store.countries.inc',
  );
  $items['admin/store/settings/countries/import'] = array(
    'title' => 'Countries',
    'description' => 'Import and manage countries.',
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'file' => 'uc_store.countries.inc',
  );
  $items['admin/store/settings/countries/fields'] = array(
    'title' => 'Address fields',
    'description' => 'Edit the address field settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_store_address_fields_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/countries/formats'] = array(
    'title' => 'Address formats',
    'description' => 'Edit country specific address format settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_country_formats_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'uc_store.countries.inc',
  );
  $items['admin/store/settings/store'] = array(
    'title' => 'Store',
    'description' => 'Configure basic store settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_store_settings_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'file' => 'uc_store.admin.inc',
    'weight' => -1,
  );
  $items['admin/store/settings/countries/%/disable'] = array(
    'title' => 'Disable a country',
    'description' => 'Disable a country from use.',
    'page callback' => '_uc_country_perform_country_action',
    'page arguments' => array(
      'uc_country_disable',
      4,
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_store.countries.inc',
  );
  $items['admin/store/settings/countries/%/enable'] = array(
    'title' => 'Enable a country',
    'description' => 'Enable a disabled country.',
    'page callback' => '_uc_country_perform_country_action',
    'page arguments' => array(
      'uc_country_enable',
      4,
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_store.countries.inc',
  );
  $items['admin/store/settings/countries/%/remove'] = array(
    'title' => 'Remove a country',
    'description' => 'Remove an installed country.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_country_remove_form',
      4,
    ),
    'access arguments' => array(
      'administer store',
    ),
    'file' => 'uc_store.countries.inc',
  );
  $items['admin/store/settings/countries/%/update/%'] = array(
    'title' => 'Update a country',
    'description' => 'Update an installed country.',
    'page callback' => '_uc_country_perform_country_action',
    'page arguments' => array(
      'uc_country_update',
      4,
      6,
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_store.countries.inc',
  );
  return $items;
}