Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CommentManagerInterface.php

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

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal