Permalink
Browse files

Add migration for story content type.

  • Loading branch information...
Rosemary Mann
Rosemary Mann committed Jan 27, 2015
1 parent b1bfbdf commit df6a3b34bd9c86aad69c9966cc3cbb628eab5f84
@@ -390,6 +390,30 @@ class OpenOutreachMigrationNodeSection extends OpenOutreachMigrationNode {
}
+/**
+ * Story migration for nodes in StoriedMaps.
+ */
+class StoriedMapsMigrationNodeStory extends OpenOutreachMigrationNode {
+
+ public function __construct($arguments) {
+ $this->setProperties('story');
+ parent::__construct($arguments);
+ $this->description = t('Import story content.');
+ $this->addFieldMapping('field_reference_location', 'location')
+ ->description(t('The location of a story.'))
+ ->sourceMigration('OpenOutreachMigrationNodeLocation');
+ // Require the nodes that are referenced.
+ $this->dependencies[] = 'OpenOutreachMigrationNodeLocation';
+ }
+
+ function csvcolumns() {
+ $columns = parent::csvcolumns();
+ $columns[] = array('location', 'Location');
+ return $columns;
+ }
+
+}
+
/**
* Base migration for terms in OpenOutreach.
*/
@@ -43,6 +43,7 @@ function openoutreach_migrate_map() {
'OpenOutreachMigrationTermLocationRegion' => 'debut_location',
'OpenOutreachMigrationMenuLinksSection' => 'debut_section',
'OpenOutreachMigrationNodeSection' => 'debut_section',
+ 'StoriedMapsMigrationNodeStory' => 'storiedmaps_story',
);
// Allow other modules to alter the migrations to, for example, use
// a custom class.

0 comments on commit df6a3b3

Please sign in to comment.