You are here

public function StringRangeArgument::buildOptionsForm in Views Contextual Range Filter 8

Build the form.

Overrides StringArgument::buildOptionsForm

File

src/Plugin/views/argument/StringRangeArgument.php, line 33

Class

StringRangeArgument
Argument handler to accept a string range.

Namespace

Drupal\contextual_range_filter\Plugin\views\argument

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['description']['#markup'] = t('Contextual string range filter values are taken from the URL.');
  $form['more']['#open'] = TRUE;
  $form['break_phrase']['#title'] = t('Allow multiple string (i.e. alphabetic) ranges');
  $form['break_phrase']['#description'] = t('If selected, multiple ranges may be specified by stringing them together with plus signs.<br/>Example: <strong>a--f+q--y</strong>');
  $form['not'] = [
    '#type' => 'checkbox',
    '#title' => t('Exclude'),
    '#description' => t('Negate the range. If selected, output matching the specified range(s) will be excluded, rather than included.'),
    '#default_value' => !empty($this->options['not']),
    '#fieldset' => 'more',
  ];
}