public function Username::buildOptionsForm

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

Overrides FieldPluginBase::buildOptionsForm

File

drupal/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Username.php, line 42
Definition of Drupal\comment\Plugin\views\field\Username.

Class

Username
Field handler to allow linking to a user account or homepage.

Namespace

Drupal\comment\Plugin\views\field

Code

public function buildOptionsForm(&$form, &$form_state) {
  $form['link_to_user'] = array(
    '#title' => t("Link this field to its user or an author's homepage"),
    '#type' => 'checkbox',
    '#default_value' => $this->options['link_to_user'],
  );
  parent::buildOptionsForm($form, $form_state);
}