public function NodeNewComments::init in Views (for Drupal 7) 8.3
Overrides Drupal\views\Plugin\views\field\FieldPluginBase::init().
Overrides FieldPluginBase::init
File
- lib/
Views/ comment/ Plugin/ views/ field/ NodeNewComments.php, line 29 - Definition of Views\comment\Plugin\views\field\NodeNewComments.
Class
- NodeNewComments
- Field handler to display the number of new comments.
Namespace
Views\comment\Plugin\views\fieldCode
public function init(ViewExecutable $view, &$options) {
parent::init($view, $options);
$this->additional_fields['nid'] = 'nid';
$this->additional_fields['type'] = 'type';
$this->additional_fields['comment_count'] = array(
'table' => 'node_comment_statistics',
'field' => 'comment_count',
);
}