/** * Deletes entity comments. * * @param integer $entityId * @param string $entityType */ public function deleteEntityComments($entityType, $entityId) { $commentEntity = $this->commentEntityDao->findByEntityTypeAndEntityId($entityType, $entityId); if ($commentEntity === null) { return; } $this->commentDao->deleteByCommentEntityId($commentEntity->getId()); $this->commentEntityDao->delete($commentEntity); }