You are here

function views_handler_argument_many_to_one::options_form in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 handlers/views_handler_argument_many_to_one.inc \views_handler_argument_many_to_one::options_form()
  2. 7.3 handlers/views_handler_argument_many_to_one.inc \views_handler_argument_many_to_one::options_form()

Overrides views_handler_argument::options_form

1 call to views_handler_argument_many_to_one::options_form()
views_handler_argument_term_node_tid::options_form in modules/taxonomy/views_handler_argument_term_node_tid.inc
1 method overrides views_handler_argument_many_to_one::options_form()
views_handler_argument_term_node_tid::options_form in modules/taxonomy/views_handler_argument_term_node_tid.inc

File

handlers/views_handler_argument_many_to_one.inc, line 39

Class

views_handler_argument_many_to_one
An argument handler for use in fields that have a many to one relationship with the table(s) to the left. This adds a bunch of options that are reasonably common with this type of relationship. Definition terms:

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);

  // allow + for or, , for and
  if (!empty($this->definition['numeric'])) {
    $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 (for OR) or 1,2,3 (for AND).'),
      '#default_value' => !empty($this->options['break_phrase']),
    );
  }
  $form['add_table'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow multiple arguments to work together'),
    '#description' => t('If selected, multiple instances of this argument can work together, as though multiple terms were supplied to the same argument. This setting is not compatible with the "Reduce duplicates" setting.'),
    '#default_value' => !empty($this->options['add_table']),
  );
  $form['require_value'] = array(
    '#type' => 'checkbox',
    '#title' => t('Do not display items with no value in summary'),
    '#default_value' => !empty($this->options['require_value']),
  );
  $this->helper
    ->options_form($form, $form_state);
}