You are here

public function CommentManagerInterface::getCountNewComments in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/comment/src/CommentManagerInterface.php \Drupal\comment\CommentManagerInterface::getCountNewComments()

Returns the number of new comments available on a given entity for a user.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to which the comments are attached to.

string $field_name: (optional) The field_name to count comments for. Defaults to any field.

int $timestamp: (optional) Time to count from. Defaults to time of last user access the entity.

Return value

int|false The number of new comments or FALSE if the user is not authenticated.

1 method overrides CommentManagerInterface::getCountNewComments()
CommentManager::getCountNewComments in core/modules/comment/src/CommentManager.php
Returns the number of new comments available on a given entity for a user.

File

core/modules/comment/src/CommentManagerInterface.php, line 76

Class

CommentManagerInterface
Comment manager contains common functions to manage comment fields.

Namespace

Drupal\comment

Code

public function getCountNewComments(EntityInterface $entity, $field_name = NULL, $timestamp = 0);