public function LinkBase::buildOptionsForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/field/LinkBase.php \Drupal\views\Plugin\views\field\LinkBase::buildOptionsForm()
Default options form that provides the label widget that all fields should have.
Overrides FieldPluginBase::buildOptionsForm
1 call to LinkBase::buildOptionsForm()
- ContactLink::buildOptionsForm in core/
modules/ contact/ src/ Plugin/ views/ field/ ContactLink.php - Default options form that provides the label widget that all fields should have.
1 method overrides LinkBase::buildOptionsForm()
- ContactLink::buildOptionsForm in core/
modules/ contact/ src/ Plugin/ views/ field/ ContactLink.php - Default options form that provides the label widget that all fields should have.
File
- core/
modules/ views/ src/ Plugin/ views/ field/ LinkBase.php, line 97 - Contains \Drupal\views\Plugin\views\field\LinkBase.
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,
];
}