Reviewed & tested by the community
February 4, 2012 - 23:30
July 11, 2013 - 23:46
Here you are my two cents from migrating emvideo fields. This patch is ready to be extended to support more emfield modules like emimage, emaudio, ...
Instructions for developers:
The example field mapping code below shows how to import video urls in emvideo field. Note that these code snippet must go into your Migration subclass's constructor - see the migrate_example module for an example of how and where to use field mappings. // Import source field "url_video" containing urls into // destination field field_emvideo: $this->addFieldMapping('field_emvideo', 'url_video'); // Import source field "url_video" containing names into // destination field field_emvideo (youtube provider is the default, // so it's not needed to pass this argument in this case): $arguments = MigrateEmvideoFieldHandler::arguments('youtube'); $this->addFieldMapping('field_emvideo', 'url_video') ->arguments($arguments);