CommentStorageInterface::getNewCommentPageNumber

public CommentStorageInterface::getNewCommentPageNumber($total_comments, $new_comments, FieldableEntityInterface $entity, $field_name)

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

File

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

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);
doc_Drupal
2016-10-29 08:51:03
Comments
Leave a Comment

Please login to continue.