You are here

function content_lock_menu in Content locking (anti-concurrent editing) 6

Same name and namespace in other branches
  1. 6.2 content_lock.module \content_lock_menu()
  2. 7.3 content_lock.module \content_lock_menu()
  3. 7 content_lock.module \content_lock_menu()
  4. 7.2 content_lock.module \content_lock_menu()

Implementation of hook_menu().

File

./content_lock.module, line 37
Allows users to lock documents for modification.

Code

function content_lock_menu() {
  $items['admin/content/node/content_lock'] = array(
    'title' => 'Locked documents',
    'page callback' => 'content_lock_overview',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer checked out documents',
    ),
    'weight' => 5,
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/content/node/content_lock/release'] = array(
    'page callback' => 'content_lock_release_item',
    'page arguments' => array(
      5,
      NULL,
    ),
    'access arguments' => array(
      'administer checked out documents',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/content/%/content_lock/releaseown'] = array(
    'page callback' => 'content_lock_release_own_item',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'check out documents',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['user/%user/content_lock'] = array(
    'title' => 'Locked documents',
    'page callback' => 'content_lock_overview',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'check out documents',
    ),
    'weight' => 5,
    'type' => MENU_LOCAL_TASK,
  );
  $items['user/%user/content_lock/release'] = array(
    'page callback' => 'content_lock_release_item',
    'page arguments' => array(
      4,
      1,
    ),
    'access arguments' => array(
      'check out documents',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['node/%/canceledit'] = array(
    'page callback' => 'content_lock_release_own_item',
    'page arguments' => array(
      1,
    ),
    'access callback' => true,
  );
  $items['ajax/content_lock/%/canceledit'] = array(
    'page callback' => 'content_lock_release_own_item',
    'page arguments' => array(
      2,
      false,
    ),
    'access callback' => true,
  );
  $items['admin/settings/content_lock'] = array(
    'type' => MENU_NORMAL_ITEM,
    'title' => 'Content lock',
    'description' => 'Configuration options for the Content lock module',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'content_lock_admin_settings',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'content_lock.admin.inc',
  );
  return $items;
}