Skip to content

Instantly share code, notes, and snippets.

View mikeryan776's full-sized avatar

Mike Ryan mikeryan776

View GitHub Profile
diff --git a/docroot/modules/custom/schwab_migrate/src/Plugin/migrate/source/MarketFileMedia.php b/docroot/modules/custom/schwab_migrate/src/Plugin/migrate/source/MarketFileMedia.php
index 877110db..ef66a5df 100644
--- a/docroot/modules/custom/schwab_migrate/src/Plugin/migrate/source/MarketFileMedia.php
+++ b/docroot/modules/custom/schwab_migrate/src/Plugin/migrate/source/MarketFileMedia.php
@@ -19,10 +19,10 @@ class MarketFileMedia extends SqlBase {
public function query() {
// Determine the migrated files from the map table, and get the actual data
// from file_managed.
- $query = $this->select('migrate_map_market_file', 'map');
- $query->condition('map.source_row_status', 0);
field_geofield:
plugin: geofield_latlon
source:
- latitude
- longitude
@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
<?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.
source:
constants:
source_null: null
process:
'body/value': body
'body/format':
-
plugin: skip_on_empty
source: body
method: process
process:
my_multivalue_field:
plugin: get
source:
- a
- b
- c
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
nid:
-
plugin: migration
migration:
-
upgrade_d6_node_article
upgrade_d6_node_blog
source: nid
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
field_geofield:
plugin: geofield_latlon
source:
- field_cap_geofield/lat
- field_cap_geofield/lon