You are here

function nat_handler_argument_term_node_tid_depth::options_form in Node Auto Term [NAT] 7

Same name and namespace in other branches
  1. 6.2 includes/nat_handler_argument_term_node_tid_depth.inc \nat_handler_argument_term_node_tid_depth::options_form()
  2. 6 includes/nat_handler_argument_term_node_tid_depth.inc \nat_handler_argument_term_node_tid_depth::options_form()
  3. 7.2 includes/nat_handler_argument_term_node_tid_depth.inc \nat_handler_argument_term_node_tid_depth::options_form()

Build the options form.

Overrides views_handler_argument::options_form

File

includes/nat_handler_argument_term_node_tid_depth.inc, line 26
NAT (Node Auto Term) nid views argument with depth handler.

Class

nat_handler_argument_term_node_tid_depth
Argument handler for NAT terms over NAT nid with depth.

Code

function options_form(&$form, &$form_state) {
  parent::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 terms per argument'),
    '#description' => t('If selected, users can enter multiple arguments in the form of 1+2+3. Due to the number of JOINs it would require, AND will be treated as OR with this argument.'),
    '#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']),
  );
}