You are here

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

Override buildOptionsForm() so that only the relevant options are displayed to the user.

Overrides ArgumentPluginBase::buildOptionsForm

File

lib/Drupal/views/Plugin/views/argument/Null.php, line 33
Definition of Drupal\views\Plugin\views\argument\Null.

Class

Null
Argument handler that ignores the argument.

Namespace

Drupal\views\Plugin\views\argument

Code

public function buildOptionsForm(&$form, &$form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['must_not_be'] = array(
    '#type' => 'checkbox',
    '#title' => t('Fail basic validation if any argument is given'),
    '#default_value' => !empty($this->options['must_not_be']),
    '#description' => t('By checking this field, you can use this to make sure views with more arguments than necessary fail validation.'),
    '#fieldset' => 'more',
  );
  unset($form['exception']);
}