You are here

function linkedin_menu in LinkedIn Integration 7

Same name and namespace in other branches
  1. 6 linkedin.module \linkedin_menu()

@todo Please document this function.

See also

http://drupal.org/node/1354

File

./linkedin.module, line 31

Code

function linkedin_menu() {
  $items = array();

  //global settings form
  $items['admin/config/services/linkedin'] = array(
    'title' => 'LinkedIn integration',
    'description' => 'linkedin module settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'linkedin_admin',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'linkedin.pages.inc',
  );

  //callback for oauth token request on linkedin API.
  $items['linkedin/token/%user'] = array(
    'type' => MENU_CALLBACK,
    'description' => 'Let user tie their LI account with their local user account',
    'page callback' => 'linkedin_access_token',
    'page arguments' => array(
      2,
    ),
    'access callback' => 'linkedin_token_access',
    'access arguments' => array(
      2,
    ),
    'file' => 'linkedin.inc',
  );

  // User settings form : used by submodules.
  $items['user/%user/edit/linkedin'] = array(
    'title' => 'Linkedin',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'linkedin_user_settings',
    'file' => 'linkedin.pages.inc',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'linkedin_user_access',
    //access arguments don't support multiple arguments, so create our access handler
    'access arguments' => array(
      1,
    ),
  );
  return $items;
}