function CommentStatistics::delete
Delete comment statistics records for an entity.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity for which comment statistics should be deleted.
Overrides CommentStatisticsInterface::delete
File
- 
              core/modules/ comment/ src/ CommentStatistics.php, line 94 
Class
Namespace
Drupal\commentCode
public function delete(EntityInterface $entity) {
  $this->database
    ->delete('comment_entity_statistics')
    ->condition('entity_id', $entity->id())
    ->condition('entity_type', $entity->getEntityTypeId())
    ->execute();
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
