You are here

public function shs_handler_filter_term_node_tid::extra_options_form in Simple hierarchical select 7

Provide a form for setting options.

Overrides views_handler_filter_term_node_tid::extra_options_form

1 call to shs_handler_filter_term_node_tid::extra_options_form()
shs_handler_filter_term_node_tid_depth::extra_options_form in includes/handlers/shs_handler_filter_term_node_tid_depth.inc
Provide a form for setting options.
1 method overrides shs_handler_filter_term_node_tid::extra_options_form()
shs_handler_filter_term_node_tid_depth::extra_options_form in includes/handlers/shs_handler_filter_term_node_tid_depth.inc
Provide a form for setting options.

File

includes/handlers/shs_handler_filter_term_node_tid.inc, line 30
Definition of shs_handler_filter_term_node_tid.

Class

shs_handler_filter_term_node_tid
Filter by term id (including selection by simple hierarchical select).

Code

public function extra_options_form(&$form, &$form_state) {
  parent::extra_options_form($form, $form_state);
  $form['type']['#options'] += array(
    'shs' => t('Simple hierarchical select'),
  );
  if (module_exists('chosen')) {
    $form['use_chosen'] = array(
      '#type' => 'select',
      '#title' => t('Output this field with !chosen', array(
        '!chosen' => l(t('Chosen'), 'http://drupal.org/project/chosen'),
      )),
      '#description' => t('Select in which cases the element will use the !chosen module for the term selection of each level.', array(
        '!chosen' => l(t('Chosen'), 'http://drupal.org/project/chosen'),
      )),
      '#default_value' => empty($this->options['use_chosen']) ? 'never' : $this->options['use_chosen'],
      '#dependency' => array(
        'radio:options[type]' => array(
          'shs',
        ),
      ),
      '#options' => array(
        'chosen' => t('let chosen decide'),
        'always' => t('always'),
        'never' => t('never'),
      ),
    );
  }
}