public function LinkBase::buildOptionsForm in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/field/LinkBase.php \Drupal\views\Plugin\views\field\LinkBase::buildOptionsForm()
- 9 core/modules/views/src/Plugin/views/field/LinkBase.php \Drupal\views\Plugin\views\field\LinkBase::buildOptionsForm()
1 call to LinkBase::buildOptionsForm()
- EntityLink::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ field/ EntityLink.php
2 methods override LinkBase::buildOptionsForm()
- ContactLink::buildOptionsForm in core/
modules/ contact/ src/ Plugin/ views/ field/ ContactLink.php - EntityLink::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ field/ EntityLink.php
File
- core/
modules/ views/ src/ Plugin/ views/ field/ LinkBase.php, line 130
Class
- LinkBase
- Field handler to present a link to an entity.
Namespace
Drupal\views\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['text'] = [
'#type' => 'textfield',
'#title' => $this
->t('Text to display'),
'#default_value' => $this->options['text'],
];
parent::buildOptionsForm($form, $form_state);
// The path is set by ::renderLink() so we do not allow to set it.
$form['alter'] += [
'path' => [],
'query' => [],
'external' => [],
];
$form['alter']['path'] += [
'#access' => FALSE,
];
$form['alter']['query'] += [
'#access' => FALSE,
];
$form['alter']['external'] += [
'#access' => FALSE,
];
}