public function Link::buildOptionsForm in Simplenews 8
Same name and namespace in other branches
- 8.2 src/Plugin/views/field/Link.php \Drupal\simplenews\Plugin\views\field\Link::buildOptionsForm()
- 3.x src/Plugin/views/field/Link.php \Drupal\simplenews\Plugin\views\field\Link::buildOptionsForm()
Default options form that provides the label widget that all fields should have.
Overrides FieldPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ field/ Link.php, line 37
Class
- Link
- Field handler to present a link to the subscriber.
Namespace
Drupal\simplenews\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['text'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Text to display'),
'#default_value' => $this->options['text'],
);
parent::buildOptionsForm($form, $form_state);
// The path is set by renderLink function so don't allow to set it.
$form['alter']['path'] = array(
'#access' => FALSE,
);
$form['alter']['external'] = array(
'#access' => FALSE,
);
}