You are here

public function MongodbCommentStatistics::getMaximumCount in MongoDB 8

Find the maximum number of comments for the given entity type.

Used to influence search rankings.

Parameters

string $entity_type: The entity type to consider when fetching the maximum comment count for.

Return value

int The maximum number of comments for and entity of the given type.

Overrides CommentStatisticsInterface::getMaximumCount

See also

comment_update_index()

File

mongodb_comment/src/MongodbCommentStatistics.php, line 153
Contains \Drupal\comment\CommentStatistics.

Class

MongodbCommentStatistics

Namespace

Drupal\mongodb_comment

Code

public function getMaximumCount($entity_type) {

  //return $this->database->query('SELECT MAX(comment_count) FROM {comment_entity_statistics} WHERE entity_type = :entity_type', array(':entity_type' => $entity_type))->fetchField();
}