CommentManagerInterface::getCountNewComments

public CommentManagerInterface::getCountNewComments(EntityInterface $entity, $field_name = NULL, $timestamp = 0)

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.

File

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

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

Please login to continue.