You are here

public function Numeric::buildOptionsForm in Views (for Drupal 7) 8.3

Same name in this branch
  1. 8.3 lib/Drupal/views/Plugin/views/argument/Numeric.php \Drupal\views\Plugin\views\argument\Numeric::buildOptionsForm()
  2. 8.3 lib/Drupal/views/Plugin/views/field/Numeric.php \Drupal\views\Plugin\views\field\Numeric::buildOptionsForm()

Build the options form.

Overrides ArgumentPluginBase::buildOptionsForm

1 call to Numeric::buildOptionsForm()
FieldList::buildOptionsForm in lib/Views/field/Plugin/views/argument/FieldList.php
Build the options form.
1 method overrides Numeric::buildOptionsForm()
FieldList::buildOptionsForm in lib/Views/field/Plugin/views/argument/FieldList.php
Build the options form.

File

lib/Drupal/views/Plugin/views/argument/Numeric.php, line 45
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',
  );
}