From 9e7ec6a517c2ba805fb5e81bde0bae97ecba7d68 Mon Sep 17 00:00:00 2001 From: Rodrigo Aguilera Date: Thu, 19 Nov 2015 10:19:00 +0100 Subject: [PATCH] Add support for comments. --- ...igrate_default_content.migrate.comment.inc | 19 +++++++++++++++++++ migrate_default_content.info | 1 + 2 files changed, 20 insertions(+) create mode 100644 includes/migrate_default_content.migrate.comment.inc diff --git a/includes/migrate_default_content.migrate.comment.inc b/includes/migrate_default_content.migrate.comment.inc new file mode 100644 index 0000000..0cc7946 --- /dev/null +++ b/includes/migrate_default_content.migrate.comment.inc @@ -0,0 +1,19 @@ +nid that is expected from drupal comment core module. + */ + public function prepare($entity, stdClass $row) { + $entity->nid = reset($entity->node); + } + +} diff --git a/migrate_default_content.info b/migrate_default_content.info index 868954b..25f8d7e 100644 --- a/migrate_default_content.info +++ b/migrate_default_content.info @@ -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'