function CommentController::attachLoad

Overrides DrupalDefaultEntityController::attachLoad

File

modules/comment/comment.module, line 1722

Class

CommentController
Controller class for comments.

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.