function ctools_context_vocabulary_settings_form in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 plugins/contexts/vocabulary.inc \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 - Plugin to provide a vocabulary context.
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;
}