function LastTimestamp::init

Same name in other branches
  1. 9 core/modules/comment/src/Plugin/views/field/LastTimestamp.php \Drupal\comment\Plugin\views\field\LastTimestamp::init()
  2. 8.9.x core/modules/comment/src/Plugin/views/field/LastTimestamp.php \Drupal\comment\Plugin\views\field\LastTimestamp::init()
  3. 10 core/modules/comment/src/Plugin/views/field/LastTimestamp.php \Drupal\comment\Plugin\views\field\LastTimestamp::init()

Overrides FieldPluginBase::init

File

core/modules/comment/src/Plugin/views/field/LastTimestamp.php, line 22

Class

LastTimestamp
Field handler to display the timestamp of a comment with the count of comments.

Namespace

Drupal\comment\Plugin\views\field

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
    parent::init($view, $display, $options);
    $this->additional_fields['comment_count'] = 'comment_count';
}

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