protected function CommentStorageController::postSave

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

Overrides DatabaseStorageController::postSave

File

drupal/core/modules/comment/lib/Drupal/comment/CommentStorageController.php, line 163
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->target_id);
  if ($comment->status->value == COMMENT_PUBLISHED) {
    module_invoke_all('comment_publish', $comment);
  }
}