Skip to content

Instantly share code, notes, and snippets.

@botris
Created November 28, 2014 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save botris/9ec9cb7023ebfd4c3551 to your computer and use it in GitHub Desktop.
Save botris/9ec9cb7023ebfd4c3551 to your computer and use it in GitHub Desktop.
Drupal to Drupal migrate, migrate associated terms
<?php
/*
* Extending DrupalNode5Migration (or 6) migrating the correct terms
* - Add the source migration and source tid
* - Declare default value
*/
$this->addFieldMapping('field_tags', '3')
->sourceMigration('Tags');
$this->addFieldMapping('field_tags:source_type')
->defaultValue('tid');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment