You are here

function uc_catalog_menu in Ubercart 7.3

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

Implements hook_menu().

File

uc_catalog/uc_catalog.module, line 33
Ubercart Catalog module.

Code

function uc_catalog_menu() {
  global $user;
  $items = array();
  $items['catalog'] = array(
    'title' => 'Catalog',
    'page callback' => 'uc_catalog_browse',
    'access arguments' => array(
      'view catalog',
    ),
    'type' => MENU_SUGGESTED_ITEM,
  );
  $items['admin/store/settings/catalog'] = array(
    'title' => 'Catalog',
    'description' => 'Configure the product catalog pages.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_catalog_settings_form',
    ),
    'access arguments' => array(
      'administer catalog',
    ),
    'file' => 'uc_catalog.admin.inc',
  );
  if (module_exists('views_ui')) {
    $items['admin/store/settings/catalog/edit'] = array(
      'title' => 'Edit catalog display',
      'description' => 'Configure the catalog display in Views.',
      'page callback' => 'drupal_goto',
      'page arguments' => array(
        'admin/structure/views/view/uc_catalog/edit',
      ),
      'access callback' => 'user_access',
      'access arguments' => array(
        'administer views',
      ),
      'type' => MENU_LOCAL_ACTION,
    );
  }
  $items['admin/store/settings/catalog/repair'] = array(
    'title' => 'Repair catalog field',
    'description' => 'Ensures the catalog taxonomy field is attached to product content types.',
    'page callback' => 'uc_catalog_repair_field',
    'access arguments' => array(
      'administer catalog',
    ),
    'file' => 'uc_catalog.admin.inc',
  );
  $items['admin/store/products/orphans'] = array(
    'title' => 'Find orphaned products',
    'description' => 'Find products that have not been categorized.',
    'page callback' => 'uc_catalog_orphaned_products',
    'access arguments' => array(
      'administer catalog',
    ),
    'weight' => -4,
    'file' => 'uc_catalog.admin.inc',
  );
  return $items;
}