You are here

function uc_stock_menu in Ubercart 6.2

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

Implements hook_menu().

File

uc_stock/uc_stock.module, line 38

Code

function uc_stock_menu() {
  $items = array();
  $items['admin/store/settings/stock'] = array(
    'title' => 'Stock settings',
    'description' => 'View the stock settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_stock_settings_form',
    ),
    'access arguments' => array(
      'administer product stock',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_stock.admin.inc',
  );
  if (module_exists('uc_reports')) {
    $items['admin/store/reports/stock'] = array(
      'title' => 'Stock reports',
      'description' => 'View reports for product stock.',
      'page callback' => 'uc_stock_report',
      'access arguments' => array(
        'view reports',
      ),
      'type' => MENU_NORMAL_ITEM,
      'file' => 'uc_stock.admin.inc',
    );
  }
  $items['node/%node/edit/stock'] = array(
    'title' => 'Stock',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_stock_edit_form',
      1,
    ),
    'access callback' => 'uc_stock_product_access',
    'access arguments' => array(
      1,
    ),
    'weight' => 10,
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_stock.admin.inc',
  );
  return $items;
}