You are here

function sf_node_menu in Salesforce Suite 5.2

Same name and namespace in other branches
  1. 6.2 sf_node/sf_node.module \sf_node_menu()

Implementation of hook_menu().

File

sf_node/sf_node.module, line 13
Integrates the core node object and various node related modules with the SalesForce API.

Code

function sf_node_menu($may_cache) {
  $items = array();
  if (arg(0) == 'node' && is_numeric(arg(1)) && user_access('sync nodes with salesforce')) {
    $items[] = array(
      'path' => 'node/' . arg(1) . '/salesforce',
      'title' => t('Salesforce'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'sf_node_salesforce_form',
        arg(1),
      ),
      'access' => user_access('sync nodes with salesforce'),
      'type' => MENU_LOCAL_TASK,
    );
  }
  return $items;
}