function NullArgument::buildOptionsForm
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/argument/NullArgument.php \Drupal\views\Plugin\views\argument\NullArgument::buildOptionsForm()
- 10 core/modules/views/src/Plugin/views/argument/NullArgument.php \Drupal\views\Plugin\views\argument\NullArgument::buildOptionsForm()
- 11.x core/modules/views/src/Plugin/views/argument/NullArgument.php \Drupal\views\Plugin\views\argument\NullArgument::buildOptionsForm()
Overrides ArgumentPluginBase::buildOptionsForm
File
-
core/
modules/ views/ src/ Plugin/ views/ argument/ NullArgument.php, line 25
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.