function CommentStorageInterface::getNewCommentPageNumber

Same name in other branches
  1. 9 core/modules/comment/src/CommentStorageInterface.php \Drupal\comment\CommentStorageInterface::getNewCommentPageNumber()
  2. 8.9.x core/modules/comment/src/CommentStorageInterface.php \Drupal\comment\CommentStorageInterface::getNewCommentPageNumber()
  3. 10 core/modules/comment/src/CommentStorageInterface.php \Drupal\comment\CommentStorageInterface::getNewCommentPageNumber()

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.)

1 method overrides CommentStorageInterface::getNewCommentPageNumber()
CommentStorage::getNewCommentPageNumber in core/modules/comment/src/CommentStorage.php
Calculates the page number for the first new comment.

File

core/modules/comment/src/CommentStorageInterface.php, line 54

Class

CommentStorageInterface
Defines an interface for comment entity storage classes.

Namespace

Drupal\comment

Code

public function getNewCommentPageNumber($total_comments, $new_comments, FieldableEntityInterface $entity, $field_name);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.