function NumberListField::buildOptionsForm
Same name in other branches
- 8.9.x core/modules/options/src/Plugin/views/argument/NumberListField.php \Drupal\options\Plugin\views\argument\NumberListField::buildOptionsForm()
- 10 core/modules/options/src/Plugin/views/argument/NumberListField.php \Drupal\options\Plugin\views\argument\NumberListField::buildOptionsForm()
- 11.x core/modules/options/src/Plugin/views/argument/NumberListField.php \Drupal\options\Plugin\views\argument\NumberListField::buildOptionsForm()
Overrides NumericArgument::buildOptionsForm
File
-
core/
modules/ options/ src/ Plugin/ views/ argument/ NumberListField.php, line 53
Class
- NumberListField
- Argument handler for list field to show human readable name in the summary.
Namespace
Drupal\options\Plugin\views\argumentCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['summary']['human'] = [
'#title' => $this->t('Display list value as human readable'),
'#type' => 'checkbox',
'#default_value' => $this->options['summary']['human'],
'#states' => [
'visible' => [
':input[name="options[default_action]"]' => [
'value' => 'summary',
],
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.