You are here

function views_node_taxonomy_filter_handler_filter_tid::options_form in Views Node Taxonomy Filter 6

Same name and namespace in other branches
  1. 7 views_node_taxonomy_filter_handler_filter_tid.inc \views_node_taxonomy_filter_handler_filter_tid::options_form()

Supply an edit form for the Filter.

File

./views_node_taxonomy_filter_handler_filter_tid.inc, line 39

Class

views_node_taxonomy_filter_handler_filter_tid
@file

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $vocabs = array();
  $result = db_query("SELECT v.vid, v.name FROM {vocabulary} v ");
  while ($vocab = db_fetch_object($result)) {
    $vocabs[$vocab->vid] = $vocab->name;
  }
  $default_value = $this->options['value'];
  $form['value'] = array(
    '#type' => 'select',
    '#title' => t('Vocabulary'),
    '#options' => $vocabs,
    '#default_value' => $default_value,
    '#description' => t('Select the Vocabulary.'),
    '#multiple' => TRUE,
  );
}