function comment_save

Accepts a submission of new or changed comment content.

Parameters

Drupal\comment\Comment $comment: A comment object.

12 calls to comment_save()
CommentCSSTest::testCommentClasses in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentCSSTest.php
Tests CSS classes on comments.
CommentFormController::save in drupal/core/modules/comment/lib/Drupal/comment/CommentFormController.php
Overrides Drupal\Core\Entity\EntityFormController::save().
CommentLinksTest::setEnvironment in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentLinksTest.php
Re-configures the environment, module settings, and user permissions.
CommentNewIndicatorTest::testCommentNewCommentsIndicator in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php
Tests new comment marker.
comment_admin_overview_submit in drupal/core/modules/comment/comment.admin.inc
Form submission handler for comment_admin_overview().

... See full list

File

drupal/core/modules/comment/comment.module, line 1403
Enables users to comment on published content.

Code

function comment_save(Comment $comment) {
  $comment
    ->save();
}