function ctools_context_vocabulary_settings_form

1 string reference to 'ctools_context_vocabulary_settings_form'
vocabulary.inc in plugins/contexts/vocabulary.inc
Plugin to provide a vocabulary context.

File

plugins/contexts/vocabulary.inc, line 50

Code

function ctools_context_vocabulary_settings_form($form, &$form_state) {
    $conf = $form_state['conf'];
    $options = array();
    foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) {
        $options[$vid] = $vocabulary->name;
    }
    $form['vid'] = array(
        '#title' => t('Vocabulary'),
        '#type' => 'select',
        '#options' => $options,
        '#default_value' => $conf['vid'],
        '#description' => t('Select the vocabulary for this form.'),
    );
    return $form;
}