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

Breadcrumb

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

function 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';
}

API Navigation

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