public function Comment::buildOptionsForm

Provide link-to-comment option

Overrides FieldPluginBase::buildOptionsForm

File

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

Class

Comment
Field handler to allow linking to a comment.

Namespace

Drupal\comment\Plugin\views\field

Code

public function buildOptionsForm(&$form, &$form_state) {
  $form['link_to_comment'] = array(
    '#title' => t('Link this field to its comment'),
    '#description' => t("Enable to override this field's links."),
    '#type' => 'checkbox',
    '#default_value' => $this->options['link_to_comment'],
  );
  $form['link_to_node'] = array(
    '#title' => t('Link field to the node if there is no comment.'),
    '#type' => 'checkbox',
    '#default_value' => $this->options['link_to_node'],
  );
  parent::buildOptionsForm($form, $form_state);
}