function comment_load

Loads the entire comment by comment ID.

Parameters

int $cid: The ID of the comment to be loaded.

bool $reset: Whether to reset the internal static entity cache. Note that the static cache is disabled in comment_entity_info() by default.

Return value

The comment object.

23 calls to comment_load()
CommentActionsTest::testCommentPublishUnpublishActions in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php
Tests comment publish and unpublish actions.
CommentContentRebuildTest::testCommentRebuild in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentContentRebuildTest.php
Tests the rebuilding of comment's content arrays on calling comment_view().
CommentInterfaceTest::testCommentInterface in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php
Tests the comment interface.
CommentLanguageTest::testCommentLanguage in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php
Test that comment language is properly set.
CommentNodeAccessTest::testThreadedCommentView in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentNodeAccessTest.php
Test that threaded comments can be viewed.

... See full list

File

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

Code

function comment_load($cid, $reset = FALSE) {
  return entity_load('comment', $cid);
}