You are here

function amazon_menu in Amazon Product Advertisement API 7

Same name and namespace in other branches
  1. 6 amazon.module \amazon_menu()
  2. 7.2 amazon.module \amazon_menu()

Implementation of hook_menu. Adds the url path for the Amazon settings page.

File

./amazon.module, line 21

Code

function amazon_menu() {
  $items = array();
  $items['admin/config/services/amazon'] = array(
    'title' => 'Amazon API',
    'description' => 'Global settings for the Amazon Ecommerce API.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'amazon_settings_form',
    ),
    'file' => 'amazon.admin.inc',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer amazon',
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/config/services/amazon/storage'] = array(
    'title' => 'Storage',
    'description' => 'Local data storage settings for Amazon products.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'amazon_storage_settings_form',
    ),
    'file' => 'amazon.admin.inc',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer amazon',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/services/amazon/test'] = array(
    'title' => 'Test',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'amazon_test_form',
    ),
    'file' => 'amazon.admin.inc',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer amazon',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/services/amazon/api'] = array(
    'title' => 'Settings',
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  return $items;
}