You are here

function taxonomy_access_menu in Taxonomy Access Control 7

Same name and namespace in other branches
  1. 5.2 taxonomy_access.module \taxonomy_access_menu()
  2. 5 taxonomy_access.module \taxonomy_access_menu()
  3. 6 taxonomy_access.module \taxonomy_access_menu()

Implements hook_menu().

File

./taxonomy_access.module, line 119
Allows administrators to specify access control for taxonomy categories.

Code

function taxonomy_access_menu() {
  $items = array();
  $items[TAXONOMY_ACCESS_CONFIG] = array(
    'title' => 'Taxonomy access control',
    'description' => 'Taxonomy-based access control for content',
    'page callback' => 'taxonomy_access_admin',
    'access arguments' => array(
      'administer permissions',
    ),
    'file' => 'taxonomy_access.admin.inc',
  );
  $items[TAXONOMY_ACCESS_CONFIG . '/role'] = array(
    'title' => 'Configure role access rules',
    'description' => 'Configure taxonomy access control',
    'page callback' => 'taxonomy_access_admin',
    'access arguments' => array(
      'administer permissions',
    ),
    'file' => 'taxonomy_access.admin.inc',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items[TAXONOMY_ACCESS_CONFIG . '/role/%/edit'] = array(
    'title callback' => 'taxonomy_access_role_edit_title',
    'title arguments' => array(
      5,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'taxonomy_access_admin_role',
      5,
    ),
    'access callback' => 'taxonomy_access_role_edit_access',
    'access arguments' => array(
      5,
    ),
    'file' => 'taxonomy_access.admin.inc',
  );
  $items[TAXONOMY_ACCESS_CONFIG . '/role/%/enable'] = array(
    'page callback' => 'taxonomy_access_enable_role_validate',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer permissions',
    ),
    'file' => 'taxonomy_access.admin.inc',
  );
  $items[TAXONOMY_ACCESS_CONFIG . '/role/%/delete'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'taxonomy_access_role_delete_confirm',
      5,
    ),
    'access callback' => 'taxonomy_access_role_delete_access',
    'access arguments' => array(
      5,
    ),
    'file' => 'taxonomy_access.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items[TAXONOMY_ACCESS_CONFIG . '/role/%/disable/%taxonomy_vocabulary'] = array(
    'page callback' => 'taxonomy_access_disable_vocab_confirm_page',
    'page arguments' => array(
      5,
      7,
    ),
    'access arguments' => array(
      'administer permissions',
    ),
    'file' => 'taxonomy_access.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['taxonomy_access/autocomplete'] = array(
    'title' => 'Autocomplete taxonomy',
    'page callback' => 'taxonomy_access_autocomplete',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'taxonomy_access.create.inc',
  );
  return $items;
}