You are here

function node_limit_menu in Node Limit 6

Same name and namespace in other branches
  1. 8 old/node_limit.module \node_limit_menu()
  2. 7 node_limit.module \node_limit_menu()

Implementation of hook_menu().

File

./node_limit.module, line 26
Module to restrict the number of nodes a user or role may create.

Code

function node_limit_menu() {
  $items = array();
  $items['admin/user/node_limit'] = array(
    'title' => t('Node Limits'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_limit_list_limits',
    ),
    'access arguments' => array(
      NODE_LIMIT_PERM_ADMIN,
    ),
  );
  $items['admin/user/node_limit/list'] = array(
    'title' => t('List'),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'access arguments' => array(
      NODE_LIMIT_PERM_ADMIN,
    ),
    'weight' => -10,
  );
  $items['admin/user/node_limit/add'] = array(
    'title' => t('Add Node Limit'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_limit_limit_form',
      '0',
    ),
    'access arguments' => array(
      NODE_LIMIT_PERM_ADMIN,
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/user/node_limit/%node_limit'] = array(
    'title' => t('Edit Node Limit'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_limit_limit_form',
      3,
    ),
    'access arguments' => array(
      NODE_LIMIT_PERM_ADMIN,
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/user/node_limit/%node_limit/delete'] = array(
    'title' => t('Delete Node Limit'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_limit_delete_form',
      3,
    ),
    'access arguments' => array(
      NODE_LIMIT_PERM_ADMIN,
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/user/node_limit/%node_limit/clone'] = array(
    'title' => t('Clone Node Limit'),
    'page callback' => 'node_limit_clone_limit',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      NODE_LIMIT_PERM_ADMIN,
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}