Same name and namespace in other branches
  1. 7.x modules/comment/comment.module \comment_ranking()
  2. 8.9.x core/modules/comment/comment.module \comment_ranking()
  3. 9 core/modules/comment/comment.module \comment_ranking()

Implements hook_ranking().

File

core/modules/comment/comment.module, line 735
Enables users to comment on published content.

Code

function comment_ranking() {
  return \Drupal::service('comment.statistics')
    ->getRankingInfo();
}