You are here

public function MongodbCommentStorage::getNewCommentPageNumber in MongoDB 8

Calculates the page number for the first new comment.

Parameters

int $total_comments: The total number of comments that the entity has.

int $new_comments: The number of new comments that the entity has.

\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity to which the comments belong.

string $field_name: The field name on the entity to which comments are attached.

Return value

array|null The page number where first new comment appears. (First page returns 0.)

Overrides CommentStorageInterface::getNewCommentPageNumber

File

mongodb_comment/src/MongodbCommentStorage.php, line 62
Contains \Drupal\mongodb_comment\MongodbCommentStorage.

Class

MongodbCommentStorage

Namespace

Drupal\mongodb_comment

Code

public function getNewCommentPageNumber($total_comments, $new_comments, FieldableEntityInterface $entity, $field_name = 'comment') {

  // TODO: Implement getNewCommentPageNumber() method.
}