You are here

function pm_block_user_menu in Privatemsg 6

Same name and namespace in other branches
  1. 6.2 pm_block_user/pm_block_user.module \pm_block_user_menu()
  2. 7.2 pm_block_user/pm_block_user.module \pm_block_user_menu()
  3. 7 pm_block_user/pm_block_user.module \pm_block_user_menu()

Implements hook_menu().

File

pm_block_user/pm_block_user.module, line 31
Allows users to block other users from sending them any messages

Code

function pm_block_user_menu() {
  $items['messages/block/%user'] = array(
    'title' => 'Block user messages',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pm_block_user_form',
      2,
    ),
    'access callback' => '_pm_block_user_access',
    'access arguments' => array(
      2,
    ),
    'type' => MENU_CALLBACK,
    'weight' => -10,
  );
  $items['admin/settings/messages/block'] = array(
    'title' => 'User blocking rules',
    'description' => 'Configure rules for which users may block each other.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pm_block_user_settings',
    ),
    'access arguments' => array(
      'administer privatemsg settings',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['messages/block/js'] = array(
    'title' => 'Javascript block actions form',
    'page callback' => 'pm_block_user_js',
    'access arguments' => array(
      'administer privatemsg settings',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}