Load comments from the database.

@todo Remove $conditions in Drupal 8.

Parameters

$cids: An array of comment IDs.

$conditions: (deprecated) An associative array of conditions on the {comments} table, where the keys are the database fields and the values are the values those fields must have. Instead, it is preferable to use EntityFieldQuery to retrieve a list of entity IDs loadable by this function.

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

Return value

An array of comment objects, indexed by comment ID.

See also

entity_load()

EntityFieldQuery

8 calls to comment_load_multiple()
comment_admin_overview in modules/comment/comment.admin.inc
Form builder for the comment overview administration form.
comment_delete_multiple in modules/comment/comment.module
Delete comments and all their replies.
comment_load in modules/comment/comment.module
Load the entire comment by cid.
comment_node_page_additions in modules/comment/comment.module
Build the comment-related elements for node detail pages.
comment_node_update_index in modules/comment/comment.module
Implements hook_node_update_index().

... See full list

File

modules/comment/comment.module, line 1682
Enables users to comment on published content.

Code

function comment_load_multiple($cids = array(), $conditions = array(), $reset = FALSE) {
  return entity_load('comment', $cids, $conditions, $reset);
}