function EntityLink::buildOptionsForm

Same name in this branch
  1. 11.x core/modules/views/src/Plugin/views/field/EntityLink.php \Drupal\views\Plugin\views\field\EntityLink::buildOptionsForm()
Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/field/EntityLink.php \Drupal\views\Plugin\views\field\EntityLink::buildOptionsForm()
  2. 9 core/modules/comment/src/Plugin/views/field/EntityLink.php \Drupal\comment\Plugin\views\field\EntityLink::buildOptionsForm()
  3. 8.9.x core/modules/views/src/Plugin/views/field/EntityLink.php \Drupal\views\Plugin\views\field\EntityLink::buildOptionsForm()
  4. 8.9.x core/modules/comment/src/Plugin/views/field/EntityLink.php \Drupal\comment\Plugin\views\field\EntityLink::buildOptionsForm()
  5. 10 core/modules/views/src/Plugin/views/field/EntityLink.php \Drupal\views\Plugin\views\field\EntityLink::buildOptionsForm()
  6. 10 core/modules/comment/src/Plugin/views/field/EntityLink.php \Drupal\comment\Plugin\views\field\EntityLink::buildOptionsForm()

Overrides FieldPluginBase::buildOptionsForm

File

core/modules/comment/src/Plugin/views/field/EntityLink.php, line 37

Class

EntityLink
Handler for showing comment module's entity links.

Namespace

Drupal\comment\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    $form['teaser'] = [
        '#type' => 'checkbox',
        '#title' => $this->t('Show teaser-style link'),
        '#default_value' => $this->options['teaser'],
        '#description' => $this->t('Show the comment link in the form used on standard entity teasers, rather than the full entity form.'),
    ];
    parent::buildOptionsForm($form, $form_state);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.