protected function CommentStorageController::attachLoad

Overrides Drupal\Core\Entity\DatabaseStorageController::attachLoad().

Overrides DatabaseStorageControllerNG::attachLoad

File

drupal/core/modules/comment/lib/Drupal/comment/CommentStorageController.php, line 44
Definition of Drupal\comment\CommentStorageController.

Class

CommentStorageController
Defines the controller class for comments.

Namespace

Drupal\comment

Code

protected function attachLoad(&$records, $load_revision = FALSE) {

  // Prepare standard comment fields.
  foreach ($records as $key => $record) {
    $record->name = $record->uid ? $record->registered_name : $record->name;
    $record->node_type = 'comment_node_' . $record->node_type;
    $records[$key] = $record;
  }
  parent::attachLoad($records, $load_revision);
}