function 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

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;
}