1 comment.entity.inc protected CommentStorageController::attachLoad(&$comments, $revision_id = FALSE)

Overrides EntityDatabaseStorageController::attachLoad().

Overrides DefaultEntityController::attachLoad

File

core/modules/comment/comment.entity.inc, line 249
Entity controller and class for comments.

Class

CommentStorageController
Defines the controller class for comments.

Code

protected function attachLoad(&$comments, $revision_id = FALSE) {
  // Set up standard comment properties.
  foreach ($comments as $key => $comment) {
    $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
    $comment->node_type = 'comment_node_' . $comment->node_type;
    $comments[$key] = $comment;
  }
  parent::attachLoad($comments, $revision_id);
}