function ManyToOneHelper::buildOptionsForm

Same name in other branches
  1. 8.9.x core/modules/views/src/ManyToOneHelper.php \Drupal\views\ManyToOneHelper::buildOptionsForm()
  2. 10 core/modules/views/src/ManyToOneHelper.php \Drupal\views\ManyToOneHelper::buildOptionsForm()
  3. 11.x core/modules/views/src/ManyToOneHelper.php \Drupal\views\ManyToOneHelper::buildOptionsForm()

File

core/modules/views/src/ManyToOneHelper.php, line 31

Class

ManyToOneHelper
This many to one helper object is used on both arguments and filters.

Namespace

Drupal\views

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    $form['reduce_duplicates'] = [
        '#type' => 'checkbox',
        '#title' => t('Reduce duplicates'),
        '#description' => t("This filter can cause items that have more than one of the selected options to appear as duplicate results. If this filter causes duplicate results to occur, this checkbox can reduce those duplicates; however, the more terms it has to search for, the less performant the query will be, so use this with caution. Shouldn't be set on single-value fields, as it may cause values to disappear from display, if used on an incompatible field."),
        '#default_value' => !empty($this->handler->options['reduce_duplicates']),
        '#weight' => 4,
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.