Skip to content

Instantly share code, notes, and snippets.

View mikeryan776's full-sized avatar

Mike Ryan mikeryan776

View GitHub Profile
id: d6_node
label: Drupal 6 nodes
migration_tags:
- Drupal 6
builder:
plugin: d6_node
source:
plugin: d6_node
process:
nid:
id: dmeblog
label: DMe Blog
migration_tags:
- Drupal 6
source:
plugin: d6_node
node_type: blog
process:
nid: nid
vid: vid
id: dmeblog_revision
label: Node revisions
migration_tags:
- Drupal 7
source:
plugin: d7_node_revision
node_type: page
process:
nid: nid
vid: vid
process:
field_whatever:
-
plugin: get
source:
- A
- B
<?php
namespace Drupal\migrate_mine\Plugin\migrate\process;
use Drupal\file\Plugin\migrate\process\d6\CckFile;
use Drupal\migrate\Plugin\MigrationInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* @MigrateProcessPlugin(
field_tags:
plugin: iterator
source: field_tags
process:
target_id: tid
field_tags:
plugin: iterator
source: field_tags
process:
target_id:
plugin: migration
migration: upgrade_d7_taxonomy_term
source: tid
'field_address/country_code':
plugin: default_value
default_value: US
'field_address/langcode':
plugin: default_value
default_value: en
'field_address/address_line1': streetAddress
'field_address/locality': city
# This has the form US-IN.
'field_address/administrative_area':
process:
nid:
plugin: migration
migration: english_node_migration
source: uuid
<?php
namespace Drupal\foo_migrate\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\migrate_plus\Entity\Migration;
/**
* Interactive configuration of the blah migration process.