You are here

public function ContactLink::buildOptionsForm in Views (for Drupal 7) 8.3

Default options form that provides the label widget that all fields should have.

Overrides Link::buildOptionsForm

File

lib/Views/contact/Plugin/views/field/ContactLink.php, line 25
Definition of Views\contact\Plugin\views\field\ContactLink.

Class

ContactLink
A field that links to the user contact page, if access is permitted.

Namespace

Views\contact\Plugin\views\field

Code

public function buildOptionsForm(&$form, &$form_state) {
  $form['text']['#title'] = t('Link label');
  $form['text']['#required'] = TRUE;
  $form['text']['#default_value'] = empty($this->options['text']) ? t('contact') : $this->options['text'];
  parent::buildOptionsForm($form, $form_state);
}