public function CommentStorageInterface::getNewCommentPageNumber in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 57 - Contains \Drupal\comment\CommentStorageInterface.
Class
- CommentStorageInterface
- Defines an interface for comment entity storage classes.
Namespace
Drupal\commentCode
public function getNewCommentPageNumber($total_comments, $new_comments, FieldableEntityInterface $entity, $field_name);