You are here

function apply_for_role_menu in Apply for role 7.2

Same name and namespace in other branches
  1. 5 apply_for_role.module \apply_for_role_menu()
  2. 6 apply_for_role.module \apply_for_role_menu()
  3. 7 apply_for_role.module \apply_for_role_menu()

Implements hook_menu().

File

./apply_for_role.module, line 62
Allows users to apply for roles.

Code

function apply_for_role_menu() {
  $items['admin/config/people/apply_for_role'] = array(
    'title' => 'Apply for role administration',
    'description' => 'Administer which roles users can apply for.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apply_for_role_settings_form',
    ),
    'access arguments' => array(
      'administer apply for role',
    ),
    'file' => 'apply_for_role.admin.inc',
  );
  $items['admin/people/apply_for_role'] = array(
    'title' => 'Role applications',
    'description' => 'View, approve, deny and delete role applications.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apply_for_role_admin_form',
    ),
    'access arguments' => array(
      'view role applications',
    ),
    'file' => 'apply_for_role.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  $items['admin/people/apply_for_role/approve/%user/%'] = array(
    'title' => 'Approve role application',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apply_for_role_approve_form',
      4,
      5,
    ),
    'access arguments' => array(
      'approve role applications',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'apply_for_role.admin.inc',
  );
  $items['admin/people/apply_for_role/deny/%user/%'] = array(
    'title' => 'Deny role application',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apply_for_role_deny_form',
      4,
      5,
    ),
    'access arguments' => array(
      'deny role applications',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'apply_for_role.admin.inc',
  );
  $items['admin/people/apply_for_role/remove/%user/%'] = array(
    'title' => 'Remove role application',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apply_for_role_remove_form',
      4,
      5,
    ),
    'access arguments' => array(
      'delete role applications',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'apply_for_role.admin.inc',
  );
  $items['user/%user/apply_for_role'] = array(
    'title' => 'Apply for role',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apply_for_role_apply_form',
      1,
    ),
    'access callback' => '_apply_for_role_apply_access',
    'access arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}