Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NodeNewComments.php

function NodeNewComments::buildOptionsForm

Overrides NumericField::buildOptionsForm

File

core/modules/comment/src/Plugin/views/field/NodeNewComments.php, line 116

Class

NodeNewComments
Field handler to display the number of new comments.

Namespace

Drupal\comment\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    $form['link_to_comment'] = [
        '#title' => $this->t('Link this field to new comments'),
        '#description' => $this->t("Enable to override this field's links."),
        '#type' => 'checkbox',
        '#default_value' => $this->options['link_to_comment'],
    ];
    parent::buildOptionsForm($form, $form_state);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal