You are here

function profile_menu in Drupal 5

Same name and namespace in other branches
  1. 4 modules/profile.module \profile_menu()
  2. 6 modules/profile/profile.module \profile_menu()
  3. 7 modules/profile/profile.module \profile_menu()

Implementation of hook_menu().

File

modules/profile/profile.module, line 56
Support for configurable user profiles.

Code

function profile_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'profile',
      'title' => t('User list'),
      'callback' => 'profile_browse',
      'access' => user_access('access user profiles'),
      'type' => MENU_SUGGESTED_ITEM,
    );
    $items[] = array(
      'path' => 'admin/user/profile',
      'title' => t('Profiles'),
      'description' => t('Create customizable fields for your users.'),
      'callback' => 'profile_admin_overview',
    );
    $items[] = array(
      'path' => 'admin/user/profile/add',
      'title' => t('Add field'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'profile_field_form',
      ),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/user/profile/autocomplete',
      'title' => t('Profile category autocomplete'),
      'callback' => 'profile_admin_settings_autocomplete',
      'access' => user_access('administer users'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/user/profile/edit',
      'title' => t('Edit field'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'profile_field_form',
      ),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/user/profile/delete',
      'title' => t('Delete field'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'profile_field_delete',
      ),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'profile/autocomplete',
      'title' => t('Profile autocomplete'),
      'callback' => 'profile_autocomplete',
      'access' => 1,
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}