protected function CommentStorageController::postSave

Overrides Drupal\Core\Entity\DatabaseStorageController::postSave().

Overrides DatabaseStorageController::postSave

File

drupal/core/modules/comment/lib/Drupal/comment/CommentStorageController.php, line 154
Definition of Drupal\comment\CommentStorageController.

Class

CommentStorageController
Defines the controller class for comments.

Namespace

Drupal\comment

Code

protected function postSave(EntityInterface $comment, $update) {
  $this
    ->releaseThreadLock();

  // Update the {node_comment_statistics} table prior to executing the hook.
  $this
    ->updateNodeStatistics($comment->nid);
  if ($comment->status == COMMENT_PUBLISHED) {
    module_invoke_all('comment_publish', $comment);
  }
}