You are here

function taxonomy_term_depth_handler_field_taxonomy::options_form in Taxonomy Term Depth 7

Provide desired depth option

Overrides views_handler_field_taxonomy::options_form

File

includes/taxonomy_term_depth_handler_field_taxonomy.inc, line 30
Field handler to provide the parents of field value terms.

Class

taxonomy_term_depth_handler_field_taxonomy
@file Field handler to provide the parents of field value terms.

Code

function options_form(&$form, &$form_state) {
  $form['desired_depth'] = array(
    '#title' => t('Desired depth to show for this hierarchy'),
    '#description' => t('Given a term this will try to show a term\'s parent at the desired depth. Starting with 1 (root depth).'),
    '#type' => 'textfield',
    '#default_value' => $this->options['desired_depth'],
    '#element_validate' => array(
      'element_validate_integer_positive',
    ),
  );
  parent::options_form($form, $form_state);
}