Index: modules/video_embed_field/src/Plugin/migrate/cckfield/EmField.php =================================================================== --- modules/video_embed_field/src/Plugin/migrate/cckfield/EmField.php (date 1448831055000) +++ modules/video_embed_field/src/Plugin/migrate/cckfield/EmField.php (date 1448831055000) @@ -0,0 +1,49 @@ + 'emvideo', + 'embed' => 'emvideo', + 'value' => 'emvideo', + 'provider' => 'emvideo', + 'data' => 'emvideo', + 'duration' => 'hidden', + ]; + } + + /** + * {@inheritdoc} + */ + public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) { + $process = [ + 'plugin' => 'd6_cck_emfield', + 'source' => $field_name, + ]; + $migration->mergeProcessOfProperty($field_name, $process); + } + +} Index: modules/video_embed_field/src/Plugin/migrate/process/d6/EmField.php =================================================================== --- modules/video_embed_field/src/Plugin/migrate/process/d6/EmField.php (date 1448831055000) +++ modules/video_embed_field/src/Plugin/migrate/process/d6/EmField.php (date 1448831055000) @@ -0,0 +1,61 @@ +migration = $migration; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $migration + ); + } + + /** + * {@inheritdoc} + */ + public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { + $attributes = unserialize($value['attributes']); + // Drupal 6 link attributes might be double serialized. + if (!is_array($attributes)) { + $attributes = unserialize($attributes); + } + + // Massage the values into the correct form for the link. + $route['uri'] = $value['url']; + $route['options']['attributes'] = $attributes; + $route['title'] = $value['title']; + return $route; + } + +}