You are here

public function NodeNewComments::buildOptionsForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/comment/src/Plugin/views/field/NodeNewComments.php \Drupal\comment\Plugin\views\field\NodeNewComments::buildOptionsForm()

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

Overrides NumericField::buildOptionsForm

File

core/modules/comment/src/Plugin/views/field/NodeNewComments.php, line 92
Contains \Drupal\comment\Plugin\views\field\NodeNewComments.

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'] = array(
    '#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);
}