You are here

function ctools_term_vocabulary_ctools_access_settings in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 plugins/access/term_vocabulary.inc \ctools_term_vocabulary_ctools_access_settings()

Settings form for the 'by term_vocabulary' access plugin.

1 string reference to 'ctools_term_vocabulary_ctools_access_settings'
term_vocabulary.inc in plugins/access/term_vocabulary.inc
Plugin to provide access control based upon term vocabulary.

File

plugins/access/term_vocabulary.inc, line 30
Plugin to provide access control based upon term vocabulary.

Code

function ctools_term_vocabulary_ctools_access_settings($form, &$form_state, $conf) {
  $options = array();
  $vocabularies = taxonomy_get_vocabularies();
  foreach ($vocabularies as $voc) {
    $options[$voc->machine_name] = check_plain($voc->name);
  }
  _ctools_term_vocabulary_ctools_access_map_vids($conf);
  $form['settings']['machine_name'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Vocabularies'),
    '#options' => $options,
    '#description' => t('Only the checked vocabularies will be valid.'),
    '#default_value' => $conf['machine_name'],
  );
  return $form;
}