You are here

function salesforce_api_menu in Salesforce Suite 7

Same name and namespace in other branches
  1. 5.2 salesforce_api/salesforce_api.module \salesforce_api_menu()
  2. 6.2 salesforce_api/salesforce_api.module \salesforce_api_menu()
  3. 7.2 salesforce_api/salesforce_api.module \salesforce_api_menu()

Implements hook_menu().

File

salesforce_api/salesforce_api.module, line 62
Defines an API that enables modules to interact with the Salesforce server.

Code

function salesforce_api_menu() {
  $items[SALESFORCE_PATH_ADMIN] = array(
    'title' => 'Salesforce',
    'description' => 'Administer settings related to your Salesforce integration.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'salesforce_api_settings_form',
    ),
    'access arguments' => array(
      'administer salesforce',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'salesforce_api.admin.inc',
  );
  $items[SALESFORCE_PATH_ADMIN . '/settings'] = array(
    'title' => 'Settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
    'file' => 'salesforce_api.admin.inc',
  );
  $items[SALESFORCE_PATH_DEMO] = array(
    'title' => 'Test/Demo',
    'page callback' => 'salesforce_api_demo',
    'access arguments' => array(
      'administer salesforce',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'salesforce_api.admin.inc',
  );
  $items[SALESFORCE_PATH_FIELDMAPS] = array(
    'title' => 'Fieldmaps',
    'description' => 'Administer fieldmap relationships between Drupal objects and Salesforce objects.',
    'page callback' => 'salesforce_api_fieldmap_admin',
    'access arguments' => array(
      'administer salesforce',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'salesforce_api.admin.inc',
  );
  $items[SALESFORCE_PATH_FIELDMAPS . '/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'access arguments' => array(
      'administer salesforce',
    ),
    'weight' => 0,
    'file' => 'salesforce_api.admin.inc',
  );
  $items[SALESFORCE_PATH_FIELDMAPS . '/add'] = array(
    'title' => 'Add',
    'description' => 'Create a new fieldmap.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'salesforce_api_fieldmap_add_form',
    ),
    'access arguments' => array(
      'administer salesforce',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
    'file' => 'salesforce_api.admin.inc',
  );
  $items[SALESFORCE_PATH_FIELDMAPS . '/%/edit'] = array(
    'title' => 'Edit fieldmap',
    'description' => 'Edit an existing fieldmap.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'salesforce_api_fieldmap_edit_form',
      4,
    ),
    'access arguments' => array(
      'administer salesforce',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'salesforce_api.admin.inc',
  );
  $items[SALESFORCE_PATH_FIELDMAPS . '/%/clone'] = array(
    'title' => 'Clone a fieldmap',
    'description' => 'Clone an existing fieldmap.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'salesforce_api_fieldmap_clone_form',
      4,
    ),
    'access arguments' => array(
      'administer salesforce',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'salesforce_api.admin.inc',
  );
  $items[SALESFORCE_PATH_FIELDMAPS . '/%/delete'] = array(
    'title' => 'Delete fieldmap',
    'description' => 'Delete an existing fieldmap.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'salesforce_api_fieldmap_delete_form',
      4,
    ),
    'access arguments' => array(
      'administer salesforce',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'salesforce_api.admin.inc',
  );
  $items[SALESFORCE_PATH_OBJECT] = array(
    'title' => 'Object setup',
    'description' => 'Define which SalesForce objects you would like to be available in your Drupal site.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'salesforce_api_admin_object',
    ),
    'access arguments' => array(
      'administer salesforce',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'salesforce_api.admin.inc',
  );
  $items[SALESFORCE_PATH_OBJECT . '/%'] = array(
    'title' => 'Object setup',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'salesforce_api_admin_object_settings',
      count(explode('/', SALESFORCE_PATH_OBJECT)),
    ),
    'access arguments' => array(
      'administer salesforce',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'salesforce_api.admin.inc',
  );
  return $items;
}