CommentStatisticsInterface
interface CommentStatisticsInterface (View source)
Provides an interface for storing and retrieving comment statistics.
Methods
Returns an array of ranking information for hook_ranking().
Read comment statistics records for an array of entities.
Update or insert comment statistics records after a comment is added.
Find the maximum number of comments for the given entity type.
Insert an empty record for the given entity.
Details
array
getRankingInfo()
Returns an array of ranking information for hook_ranking().
object[]
read(EntityInterface[] $entities, string $entity_type, bool $accurate = TRUE)
Read comment statistics records for an array of entities.
delete(EntityInterface $entity)
Delete comment statistics records for an entity.
update(CommentInterface $comment)
Update or insert comment statistics records after a comment is added.
int
getMaximumCount(string $entity_type)
Find the maximum number of comments for the given entity type.
Used to influence search rankings.
create(FieldableEntityInterface $entity, array $fields)
Insert an empty record for the given entity.