1 views_handler_argument_term_node_tid_depth.inc views_handler_argument_term_node_tid_depth::options_form(&$form, &$form_state)

Build the options form.

Overrides views_handler_argument::options_form

File

core/modules/taxonomy/views/views_handler_argument_term_node_tid_depth.inc, line 27
Definition of views_handler_argument_term_node_tid_depth.

Class

views_handler_argument_term_node_tid_depth
Argument handler for taxonomy terms with depth.

Code

function options_form(&$form, &$form_state) {
  $form['depth'] = array(
    '#type' => 'weight',
    '#title' => t('Depth'),
    '#default_value' => $this->options['depth'],
    '#description' => t('The depth will match nodes tagged with terms in the hierarchy. For example, if you have the term "fruit" and a child term "apple", with a depth of 1 (or higher) then filtering for the term "fruit" will get nodes that are tagged with "apple" as well as "fruit". If negative, the reverse is true; searching for "apple" will also pick up nodes tagged with "fruit" if depth is -1 (or lower).'),
  );

  $form['break_phrase'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow multiple values'),
    '#description' => t('If selected, users can enter multiple values in the form of 1+2+3. Due to the number of JOINs it would require, AND will be treated as OR with this filter.'),
    '#default_value' => !empty($this->options['break_phrase']),
  );

  $form['set_breadcrumb'] = array(
    '#type' => 'checkbox',
    '#title' => t("Set the breadcrumb for the term parents"),
    '#description' => t('If selected, the breadcrumb trail will include all parent terms, each one linking to this view. Note that this only works if just one term was received.'),
    '#default_value' => !empty($this->options['set_breadcrumb']),
  );

  $form['use_taxonomy_term_path'] = array(
    '#type' => 'checkbox',
    '#title' => t("Use Backdrop's taxonomy term path to create breadcrumb links"),
    '#description' => t('If selected, the links in the breadcrumb trail will be created using the standard Backdrop method instead of the custom views method. This is useful if you are using modules like taxonomy redirect to modify your taxonomy term links.'),
    '#default_value' => !empty($this->options['use_taxonomy_term_path']),
    '#states' => array(
      'visible' => array(
        ':input[name="options[set_breadcrumb]"]' => array('checked' => TRUE),
      ),
    ),
  );
  parent::options_form($form, $form_state);
}