Skip to content
This repository has been archived by the owner on May 4, 2020. It is now read-only.

Commit

Permalink
Add support for comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoaguilera committed Nov 19, 2015
1 parent 3589e27 commit 9e7ec6a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions includes/migrate_default_content.migrate.comment.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* @file
* Populate content for comments.
*/

/**
* Class to manage comment migrations.
*/
class defaultComment extends defaultEntity {

/**
* Fill the $entity->nid that is expected from drupal comment core module.
*/
public function prepare($entity, stdClass $row) {
$entity->nid = reset($entity->node);
}

}
1 change: 1 addition & 0 deletions migrate_default_content.info
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies[] = migrate_extras
dependencies[] = libraries

files[] = 'includes/migrate_default_content.migrate.base.inc'
files[] = 'includes/migrate_default_content.migrate.comment.inc'
files[] = 'includes/migrate_default_content.migrate.entity.inc'
files[] = 'includes/migrate_default_content.migrate.file.inc'
files[] = 'includes/migrate_default_content.migrate.field_collection.inc'
Expand Down

0 comments on commit 9e7ec6a

Please sign in to comment.