public function PrerenderList::buildOptionsForm in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/field/PrerenderList.php \Drupal\views\Plugin\views\field\PrerenderList::buildOptionsForm()
- 10 core/modules/views/src/Plugin/views/field/PrerenderList.php \Drupal\views\Plugin\views\field\PrerenderList::buildOptionsForm()
Default options form that provides the label widget that all fields should have.
Overrides FieldPluginBase::buildOptionsForm
1 call to PrerenderList::buildOptionsForm()
- TaxonomyIndexTid::buildOptionsForm in core/
modules/ taxonomy/ src/ Plugin/ views/ field/ TaxonomyIndexTid.php - Provide "link to term" option.
1 method overrides PrerenderList::buildOptionsForm()
- TaxonomyIndexTid::buildOptionsForm in core/
modules/ taxonomy/ src/ Plugin/ views/ field/ TaxonomyIndexTid.php - Provide "link to term" option.
File
- core/
modules/ views/ src/ Plugin/ views/ field/ PrerenderList.php, line 45
Class
- PrerenderList
- Field handler to provide a list of items.
Namespace
Drupal\views\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['type'] = [
'#type' => 'radios',
'#title' => $this
->t('Display type'),
'#options' => [
'ul' => $this
->t('Unordered list'),
'ol' => $this
->t('Ordered list'),
'separator' => $this
->t('Simple separator'),
],
'#default_value' => $this->options['type'],
];
$form['separator'] = [
'#type' => 'textfield',
'#title' => $this
->t('Separator'),
'#default_value' => $this->options['separator'],
'#states' => [
'visible' => [
':input[name="options[type]"]' => [
'value' => 'separator',
],
],
],
];
parent::buildOptionsForm($form, $form_state);
}