You are here

function taxonomy_access_disable_vocab_confirm in Taxonomy Access Control 7

Returns a confirmation form for disabling a vocabulary for a role.

Parameters

int $rid: The role ID.

object $vocab: The vocabulary object.

See also

taxonomy_access_disable_vocab_confirm_page()

taxonomy_access_disable_vocab_confirm_submit()

1 string reference to 'taxonomy_access_disable_vocab_confirm'
taxonomy_access_disable_vocab_confirm_page in ./taxonomy_access.admin.inc
Page callback: Returns a confirmation form to disable a vocabulary.

File

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

Code

function taxonomy_access_disable_vocab_confirm($form, &$form_state, $rid, $vocab) {
  $roles = _taxonomy_access_user_roles();
  if (taxonomy_access_role_enabled($rid)) {
    $form['rid'] = array(
      '#type' => 'value',
      '#value' => $rid,
    );
    $form['vid'] = array(
      '#type' => 'value',
      '#value' => $vocab->vid,
    );
    $form['vocab_name'] = array(
      '#type' => 'value',
      '#value' => $vocab->name,
    );
    return confirm_form($form, t("Are you sure you want to delete all Taxonomy access rules for %vocab in the %role role?", array(
      '%role' => $roles[$rid],
      '%vocab' => $vocab->name,
    )), TAXONOMY_ACCESS_CONFIG . '/role/%/edit', t('This action cannot be undone.'), t('Delete all'), t('Cancel'));
  }
}