Skip to content

Instantly share code, notes, and snippets.

@heddn
Last active September 14, 2016 19:00
Show Gist options
  • Save heddn/3cc8c42666fa00682c1f6ff86668cbad to your computer and use it in GitHub Desktop.
Save heddn/3cc8c42666fa00682c1f6ff86668cbad to your computer and use it in GitHub Desktop.
field_kilde_paragraphs:
plugin: iterator
source: kilde
process:
id:
-
plugin: migration
source:
- bibliotek_dk_url
- linktekst
- url
- navn
- tekst
- linkgroupname
migration: migrate_kilde_paragraphs
no_stub: true
-
plugin: extract
index:
- id
Actual
$row->rawDestination['field_kilde_paragraphs'][
0 => [
'id' => [
0 => 14795
1 => 14796
],
],
1 => [
'id' => [
0 => 14796
1 => 14797
],
],
2 => [
'id' => [
0 => 14797
1 => 14798
],
],
];
Desired
$row->rawDestination['field_kilde_paragraphs'][
0 => [
'target_id' => 14795
'target_revision_id' => 14796
],
1 => [
'target_id' => 14796
'target_revision_id' => 14797
],
2 => [
'target_id' => 14797
'target_revision_id' => 14798
],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment