Skip to content

Instantly share code, notes, and snippets.

View mikeryan776's full-sized avatar

Mike Ryan mikeryan776

View GitHub Profile
exploded_value:
plugin: explode
delimiter: '-'
source: array_content
field_acme_multivalue:
plugin: iterator
source: '@exploded_value'
process:
value:
plugin: get
migrate_plus$ git pull
Already up-to-date.
migrate_plus$ git status
On branch 8.x-2.x
Your branch is up-to-date with 'origin/8.x-2.x'.
nothing to commit, working directory clean
migrate_plus$ git apply -v ~/tmp/properly_integrate-2752335-18.patch
Checking patch migrate_plus.info.yml...
Checking patch migrate_plus.module...
Checking patch migrations/migration_config_deriver.yml...
field_geofield:
plugin: geofield_latlon
source:
- field_cap_geofield/lat
- field_cap_geofield/lon
process:
...
'field_address/country_code':
plugin: default_value
default_value: US
'field_address/langcode':
plugin: default_value
default_value: en
'field_address/address_line1': AddressLineOne
nid:
-
plugin: migration
migration:
-
upgrade_d6_node_article
upgrade_d6_node_blog
source: nid
temp_paragraph_id:
plugin: migration
source: paragraph_test_1_id
migration: import_paragraph_test_1
no_stub: true
field_paragraph_test_1/target_id:
plugin: extract
source: '@temp_paragraph_id'
index:
- 0
process:
my_multivalue_field:
plugin: get
source:
- a
- b
- c
source:
constants:
source_null: null
process:
'body/value': body
'body/format':
-
plugin: skip_on_empty
source: body
method: process
<?php
namespace Drupal\foo_migrate\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\migrate_plus\Entity\MigrationGroup;
/**
* Interactive configuration of the Foo migration process.
@mikeryan776
mikeryan776 / image_reference.yml
Created January 27, 2017 21:57
Image reference example
field_person_photo:
plugin: iterator
source: field_author_image
process:
target_id:
plugin: migration
migration: file
source: fid
alt: alt
title: title