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 comment

CommentStorageInterface::loadThread

public CommentStorageInterface::loadThread(EntityInterface $entity, $field_name, $mode, $comments_per_page = 0, $pager_id = 0) Retrieves comments for a thread, sorted in an order suitable for display. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity whose comment(s) needs rendering. string $field_name: The field_name whose comment(s) needs rendering. int $mode: The comment display mode: CommentManagerInterface::COMMENT_MODE_FLAT or CommentManagerInterface::COMMENT_MODE_THREAD

CommentStorageInterface::getUnapprovedCount

public CommentStorageInterface::getUnapprovedCount() Returns the number of unapproved comments. Return value int The number of unapproved comments. File core/modules/comment/src/CommentStorageInterface.php, line 111 Class CommentStorageInterface Defines an interface for comment entity storage classes. Namespace Drupal\comment Code public function getUnapprovedCount();

CommentStorageInterface::getMaxThreadPerThread

public CommentStorageInterface::getMaxThreadPerThread(CommentInterface $comment) Gets the maximum encoded thread value for the children of this comment. Parameters \Drupal\comment\CommentInterface $comment: A comment entity. Return value string The maximum encoded thread value among all replies of $comment. File core/modules/comment/src/CommentStorageInterface.php, line 35 Class CommentStorageInterface Defines an interface for comment entity storage classes. Namespace Drupal\comment

CommentStorageInterface

Defines an interface for comment entity storage classes. Hierarchy interface \Drupal\Core\Entity\EntityStorageInterfaceinterface \Drupal\Core\Entity\ContentEntityStorageInterfaceinterface \Drupal\comment\CommentStorageInterface File core/modules/comment/src/CommentStorageInterface.php, line 12 Namespace Drupal\comment Members Name Modifiers Type Description CommentStorageInterface::getChildCids public function Gets the comment ids of the passed comment entities' childr

CommentStorageInterface::getChildCids

public CommentStorageInterface::getChildCids(array $comments) Gets the comment ids of the passed comment entities' children. Parameters \Drupal\comment\CommentInterface[] $comments: An array of comment entities keyed by their ids. Return value array The entity ids of the passed comment entities' children as an array. File core/modules/comment/src/CommentStorageInterface.php, line 81 Class CommentStorageInterface Defines an interface for comment entity storage classes. Namespace Drupal

CommentStorageInterface::getMaxThread

public CommentStorageInterface::getMaxThread(CommentInterface $comment) Gets the maximum encoded thread value for the top level comments. Parameters \Drupal\comment\CommentInterface $comment: A comment entity. Return value string The maximum encoded thread value among the top level comments of the node $comment belongs to. File core/modules/comment/src/CommentStorageInterface.php, line 24 Class CommentStorageInterface Defines an interface for comment entity storage classes. Namespace

CommentStorageInterface::getDisplayOrdinal

public CommentStorageInterface::getDisplayOrdinal(CommentInterface $comment, $comment_mode, $divisor = 1) Gets the display ordinal or page number for a comment. Parameters \Drupal\comment\CommentInterface $comment: The comment to use as a reference point. int $comment_mode: The comment display mode: CommentManagerInterface::COMMENT_MODE_FLAT or CommentManagerInterface::COMMENT_MODE_THREADED. int $divisor: Defaults to 1, which returns the display ordinal for a comment. If the number of comments

CommentStorage::getUnapprovedCount

public CommentStorage::getUnapprovedCount() Returns the number of unapproved comments. Return value int The number of unapproved comments. Overrides CommentStorageInterface::getUnapprovedCount File core/modules/comment/src/CommentStorage.php, line 326 Class CommentStorage Defines the storage handler class for comments. Namespace Drupal\comment Code public function getUnapprovedCount() { return $this->database->select('comment_field_data', 'c') ->condition('status', Comm

CommentStorage::getNewCommentPageNumber

public CommentStorage::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 att