public function Numeric::buildOptionsForm

Same name in this branch

Build the options form.

Overrides ArgumentPluginBase::buildOptionsForm

1 call to Numeric::buildOptionsForm()
1 method overrides Numeric::buildOptionsForm()

File

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

Class

Numeric
Basic argument handler for arguments that are numeric. Incorporates break_phrase.

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['not'] = array(
    '#type' => 'checkbox',
    '#title' => t('Exclude'),
    '#description' => t('If selected, the numbers entered for the filter will be excluded rather than limiting the view.'),
    '#default_value' => !empty($this->options['not']),
    '#fieldset' => 'more',
  );
}