You are here

function profile2_menu in Profile 2 7

Same name and namespace in other branches
  1. 7.2 profile2.module \profile2_menu()

Implements hook_menu().

File

./profile2.module, line 111
Support for configurable user profiles.

Code

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

  // Define page which provides form to generate profiles using
  // Devel generate module.
  if (module_exists('devel_generate')) {
    $items['admin/config/development/generate/profile2'] = array(
      'title' => 'Generate profiles',
      'description' => 'Generate a given number of profiles for users. Optionally override current user profiles.',
      'access arguments' => array(
        'administer profiles',
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'profile2_generate_form',
      ),
      'file' => 'profile2.devel.inc',
    );
  }
  $items['user/%profile2_by_uid/%/delete'] = array(
    'title' => 'Delete',
    'description' => 'Delete Profile of User.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'profile2_delete_confirm_form',
      1,
    ),
    'load arguments' => array(
      2,
    ),
    'access callback' => 'profile2_access',
    'access arguments' => array(
      'delete',
      1,
    ),
    'file' => 'profile2.delete.inc',
  );
  return $items;
}