<?php
namespace Drupal\forum;
+
use Drupal\comment\CommentInterface;
use Drupal\Core\Database\Connection;
use Drupal\node\NodeInterface;
':status' => CommentInterface::PUBLISHED,
])->fetchObject();
$this->database->update('forum_index')
- ->fields( [
+ ->fields([
'comment_count' => $count,
'last_comment_timestamp' => $last_reply->created,
])
// Comments do not exist.
// @todo This should be actually filtering on the desired node language
$this->database->update('forum_index')
- ->fields( [
+ ->fields([
'comment_count' => 0,
'last_comment_timestamp' => $node->getCreatedTime(),
])