function ManyToOne::buildOptionsForm
Same name in other branches
- 9 core/modules/views/src/Plugin/views/argument/ManyToOne.php \Drupal\views\Plugin\views\argument\ManyToOne::buildOptionsForm()
- 8.9.x core/modules/views/src/Plugin/views/argument/ManyToOne.php \Drupal\views\Plugin\views\argument\ManyToOne::buildOptionsForm()
- 10 core/modules/views/src/Plugin/views/argument/ManyToOne.php \Drupal\views\Plugin\views\argument\ManyToOne::buildOptionsForm()
Overrides ArgumentPluginBase::buildOptionsForm
File
-
core/
modules/ views/ src/ Plugin/ views/ argument/ ManyToOne.php, line 68
Class
- ManyToOne
- Argument handler for many to one relationships.
Namespace
Drupal\views\Plugin\views\argumentCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
// Allow '+' for "or". Allow ',' for "and".
$form['break_phrase'] = [
'#type' => 'checkbox',
'#title' => $this->t('Allow multiple values'),
'#description' => $this->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']),
'#group' => 'options][more',
];
$form['add_table'] = [
'#type' => 'checkbox',
'#title' => $this->t('Allow multiple filter values to work together'),
'#description' => $this->t('If selected, multiple instances of this filter can work together, as though multiple values were supplied to the same filter. This setting is not compatible with the "Reduce duplicates" setting.'),
'#default_value' => !empty($this->options['add_table']),
'#group' => 'options][more',
];
$form['require_value'] = [
'#type' => 'checkbox',
'#title' => $this->t('Do not display items with no value in summary'),
'#default_value' => !empty($this->options['require_value']),
'#group' => 'options][more',
];
$this->helper
->buildOptionsForm($form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.