function NullArgument::buildOptionsForm
Overrides ArgumentPluginBase::buildOptionsForm
File
- 
              core/
modules/ views/ src/ Plugin/ views/ argument/ NullArgument.php, line 30  
Class
- NullArgument
 - Argument handler that ignores the argument.
 
Namespace
Drupal\views\Plugin\views\argumentCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['must_not_be'] = [
    '#type' => 'checkbox',
    '#title' => $this->t('Fail basic validation if any argument is given'),
    '#default_value' => !empty($this->options['must_not_be']),
    '#description' => $this->t('By checking this field, you can use this to make sure views with more arguments than necessary fail validation.'),
    '#group' => 'options][more',
  ];
  unset($form['exception']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.