public function ManyToOne::buildOptionsForm

Build the options form.

Overrides ArgumentPluginBase::buildOptionsForm

1 call to ManyToOne::buildOptionsForm()
IndexTid::buildOptionsForm in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument/IndexTid.php
Build the options form.
1 method overrides ManyToOne::buildOptionsForm()
IndexTid::buildOptionsForm in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument/IndexTid.php
Build the options form.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/ManyToOne.php, line 63
Definition of Drupal\views\Plugin\views\argument\ManyToOne.

Class

ManyToOne
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:

Namespace

Drupal\views\Plugin\views\argument

Code

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

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