You are here

function taxonomy_access_admin in Taxonomy Access Control 5.2

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

Menu callback; presents the category permissions page of TAC (admin/user/taxonomy_access).

1 string reference to 'taxonomy_access_admin'
taxonomy_access_menu in ./taxonomy_access.module
Implementation of hook_menu

File

./taxonomy_access_admin.inc, line 22
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);
    }
  }
  else {
    if (!isset($op) and !isset($rid)) {
      return theme_taxonomy_access_admin();
    }
    else {
      return drupal_not_found();
    }
  }
}