You are here

function salesforce_menu in Salesforce Suite 5

Same name and namespace in other branches
  1. 7.3 salesforce.module \salesforce_menu()

Implementation of hook_menu().

File

./salesforce.module, line 25
Original Creator, Maintainer & Developer: Steve McKenzie (http://drupal.org/user/45890) Drupal and Salesforce.com (mainly only working with contacts / leads but can be extended to do anything the salesforce API version 6 can do) Current…

Code

function salesforce_menu($may_cache) {
  $items = array();

  // 4.7 to 5.x conversion: replace hook_settings with menu callback
  $items[] = array(
    'path' => 'admin/settings/salesforce',
    'title' => t('Salesforce'),
    'description' => t('Configure salesforce access.'),
    'callback' => 'drupal_get_form',
    'callback arguments' => array(
      'salesforce_admin_settings',
    ),
    'access' => user_access('administer site configuration'),
    'type' => MENU_NORMAL_ITEM,
  );
  $items[] = array(
    'path' => 'admin/content/salesforce',
    'title' => t('Salesforce'),
    'access' => user_access('administer salesforce'),
    'callback' => 'salesforce_admin_page',
  );
  $items[] = array(
    'path' => 'admin/content/salesforce/logs',
    'title' => t('logs'),
    'access' => user_access('administer salesforce'),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -1,
    'callback' => 'salesforce_admin_page',
  );
  $items[] = array(
    'path' => 'admin/content/salesforce/lead',
    'title' => t('Leads'),
    'access' => user_access('administer salesforce'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 0,
    'callback' => 'salesforce_admin_page',
  );
  $items[] = array(
    'path' => 'admin/content/salesforce/contact',
    'title' => t('Contacts'),
    'access' => user_access('administer salesforce'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'callback' => 'salesforce_admin_page',
  );
  $items[] = array(
    'path' => 'admin/logs/salesforce/log/delete',
    'title' => t('Delete log'),
    'access' => user_access('administer salesforce'),
    'type' => MENU_CALLBACK,
    'callback' => 'salesforce_log_manage_page',
  );
  $items[] = array(
    'path' => 'admin/logs/salesforce/log/enable',
    'title' => t('Enable log'),
    'access' => user_access('administer salesforce'),
    'type' => MENU_CALLBACK,
    'callback' => 'salesforce_log_manage_page',
  );
  $items[] = array(
    'path' => 'admin/logs/salesforce/log/disable',
    'title' => t('disable log'),
    'access' => user_access('administer salesforce'),
    'type' => MENU_CALLBACK,
    'callback' => 'salesforce_log_manage_page',
  );
  $items[] = array(
    'path' => 'admin/logs/salesforce/log/run',
    'title' => t('run logged entry'),
    'access' => user_access('administer salesforce'),
    'type' => MENU_CALLBACK,
    'callback' => 'salesforce_log_run_page',
  );
  return $items;
}