You are here

function taxonomy_access_admin in Taxonomy Access Control 6

Same name and namespace in other branches
  1. 5.2 taxonomy_access_admin.inc \taxonomy_access_admin()
  2. 7 taxonomy_access.admin.inc \taxonomy_access_admin()

Menu callback (for admin/user/taxonomy_access). Renders the TAC permissions administration form.

Parameters

$op: The operation to perform, if any. Options are 'edit' or 'delete' (access rules for the role).

$rid: The role id of the role to configure.

$arg: Additional arguments. (Not used.)

Return value

Form to render.

1 string reference to 'taxonomy_access_admin'
taxonomy_access_menu in ./taxonomy_access.module
Implements hook_menu().

File

./taxonomy_access.admin.inc, line 23
Administrative interface for taxonomy access control.

Code

function taxonomy_access_admin($op = NULL, $rid = NULL, $arg = NULL) {
  $roles = _taxonomy_access_user_roles();
  if (is_numeric($rid) and isset($roles[$rid])) {
    switch ($op) {
      case 'edit':
        return drupal_get_form('taxonomy_access_admin_form', $rid);
      case 'delete':
        return drupal_get_form('taxonomy_access_admin_delete_role', $rid);
    }
  }
  elseif (!isset($op) and !isset($rid)) {
    return theme_taxonomy_access_admin();
  }
  else {
    return drupal_not_found();
  }
}