You are here

function uc_dropdown_attributes_menu in Dropdown Attributes 7

Same name and namespace in other branches
  1. 6 uc_dropdown_attributes.module \uc_dropdown_attributes_menu()

Implements hook_menu().

File

./uc_dropdown_attributes.module, line 17
Show/hide attributes based on the values of other attributes.

Code

function uc_dropdown_attributes_menu() {
  $items = array();
  $items['node/%node/edit/dependencies'] = array(
    'title' => 'Dependencies',
    'description' => 'Product attribute dependency administration.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_dropdown_attributes_product',
      1,
    ),
    'access callback' => 'uc_attribute_product_access',
    'access arguments' => array(
      1,
    ),
    'theme callback' => 'uc_dropdown_attributes_admin_theme',
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'dependent_dropdown.inc',
  );
  $items['node/%/dependencies/%/dependency/%'] = array(
    'type' => MENU_CALLBACK,
    'page callback' => 'uc_dropdown_attributes_dependency',
    'page arguments' => array(
      1,
      3,
      5,
    ),
    'access callback' => TRUE,
  );
  $items['admin/store/products/classes/%/dependencies'] = array(
    'title' => 'Dependencies',
    'description' => 'Product class attribute dependency administration.',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_dropdown_attributes_class',
      4,
    ),
    'access arguments' => array(
      'administer product classes',
    ),
    'file' => 'dependent_dropdown.inc',
  );
  return $items;
}