You are here

function panels_context_vocabulary_settings_form in Panels 6.2

Same name and namespace in other branches
  1. 5.2 contexts/vocabulary.inc \panels_context_vocabulary_settings_form()
1 string reference to 'panels_context_vocabulary_settings_form'
panels_vocabulary_panels_contexts in contexts/vocabulary.inc
@file contexts/vocabulary.inc

File

contexts/vocabulary.inc, line 47
contexts/vocabulary.inc

Code

function panels_context_vocabulary_settings_form($conf, $external = FALSE) {
  $options = array();
  if ($external) {
    $options[0] = t('External source');
  }
  foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) {
    $options[$vid] = $vocabulary->name;
  }
  $form['vid'] = array(
    '#title' => t('Vocabulary'),
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => $conf['vids'],
    '#prefix' => '<div class="clear-block">',
    '#suffix' => '</div>',
    '#description' => t('Select the vocabulary for this form.'),
  );
  if ($external) {
    $form['vid']['#description'] .= ' ' . t('Select external to require this from an external source (such as a containing panel page).');
  }
  return $form;
}