Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
|
@ -0,0 +1,17 @@
|
|||
id: d6_action_settings
|
||||
label: Drupal 6 action configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- actions_max_stack
|
||||
process:
|
||||
recursion_limit: actions_max_stack
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: action.settings
|
||||
dependencies:
|
||||
module:
|
||||
- action
|
||||
- migrate_drupal
|
|
@ -0,0 +1,25 @@
|
|||
id: d6_aggregator_feed
|
||||
label: Drupal 6 aggregator feeds
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_aggregator_feed
|
||||
|
||||
process:
|
||||
fid: fid
|
||||
title: title
|
||||
url: url
|
||||
refresh: refresh
|
||||
checked: checked
|
||||
link: link
|
||||
description: description
|
||||
image: image
|
||||
etag: etag
|
||||
modified: modified
|
||||
|
||||
destination:
|
||||
plugin: entity:aggregator_feed
|
||||
dependencies:
|
||||
module:
|
||||
- aggregator
|
||||
- migrate_drupal
|
|
@ -0,0 +1,30 @@
|
|||
id: d6_aggregator_item
|
||||
label: Drupal 6 aggregator items
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_aggregator_item
|
||||
process:
|
||||
iid: iid
|
||||
fid:
|
||||
plugin: migration
|
||||
migration: d6_aggregator_feed
|
||||
source:
|
||||
- fid
|
||||
title: title
|
||||
link: link
|
||||
author: author
|
||||
description: description
|
||||
timestamp: timestamp
|
||||
guid: guid
|
||||
destination:
|
||||
plugin: entity:aggregator_item
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_aggregator_feed
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_aggregator_feed
|
||||
module:
|
||||
- aggregator
|
||||
- migrate_drupal
|
|
@ -0,0 +1,29 @@
|
|||
id: d6_aggregator_settings
|
||||
label: Drupal 6 aggregator configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- aggregator_fetcher
|
||||
- aggregator_parser
|
||||
- aggregator_processors
|
||||
- aggregator_allowed_html_tags
|
||||
- aggregator_teaser_length
|
||||
- aggregator_clear
|
||||
- aggregator_summary_items
|
||||
process:
|
||||
fetcher: aggregator_fetcher
|
||||
parser: aggregator_parser
|
||||
processors: aggregator_processors
|
||||
'items/allowed_html': aggregator_allowed_html_tags
|
||||
'items/teaser_length': aggregator_teaser_length
|
||||
'items/expire': aggregator_clear
|
||||
'source/list_max': aggregator_summary_items
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: aggregator.settings
|
||||
dependencies:
|
||||
module:
|
||||
- aggregator
|
||||
- migrate_drupal
|
|
@ -0,0 +1,102 @@
|
|||
id: d6_block
|
||||
label: Drupal 6 blocks
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_block
|
||||
process:
|
||||
# Drupal 8 does not have a status but it doesn't matter; this is here to
|
||||
# skip disabled blocks.
|
||||
status:
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
source: status
|
||||
id:
|
||||
# We need something unique, so aggregator, aggregator_1 etc will do.
|
||||
plugin: dedupe_entity
|
||||
entity_type: block
|
||||
field: id
|
||||
postfix: _
|
||||
length: 32
|
||||
source: module
|
||||
plugin:
|
||||
-
|
||||
plugin: static_map
|
||||
bypass: true
|
||||
source:
|
||||
- module
|
||||
- delta
|
||||
map:
|
||||
book:
|
||||
0: book_navigation
|
||||
comment:
|
||||
0: views_block:comments_recent-block_1
|
||||
forum:
|
||||
0: forum_active_block
|
||||
1: forum_new_block
|
||||
locale:
|
||||
0: language_block
|
||||
node:
|
||||
0: node_syndicate_block
|
||||
search:
|
||||
0: search_form_block
|
||||
statistics:
|
||||
0: statistics_popular_block
|
||||
system:
|
||||
0: system_powered_by_block
|
||||
user:
|
||||
0: user_login_block
|
||||
1: system_menu_block:tools
|
||||
2: views_block:who_s_new-block_1
|
||||
3: views_block:who_s_online-who_s_online_block
|
||||
-
|
||||
plugin: d6_block_plugin_id
|
||||
theme:
|
||||
plugin: d6_block_theme
|
||||
source:
|
||||
- theme
|
||||
- default_theme
|
||||
- admin_theme
|
||||
region:
|
||||
plugin: d6_block_region
|
||||
source:
|
||||
- region
|
||||
- theme
|
||||
- @theme
|
||||
region_map:
|
||||
left: sidebar_first
|
||||
right: sidebar_second
|
||||
sidebar_first: sidebar_first
|
||||
sidebar_second: sidebar_second
|
||||
help: help
|
||||
header: header
|
||||
footer: footer
|
||||
label: title
|
||||
weight: weight
|
||||
settings:
|
||||
plugin: d6_block_settings
|
||||
source:
|
||||
- @plugin
|
||||
- delta
|
||||
- settings
|
||||
visibility:
|
||||
plugin: d6_block_visibility
|
||||
source:
|
||||
- pages
|
||||
- roles
|
||||
- visibility
|
||||
destination:
|
||||
plugin: entity:block
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_menu
|
||||
- d6_custom_block
|
||||
- d6_user_role
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_custom_block
|
||||
- migrate.migration.d6_menu
|
||||
- migrate.migration.d6_user_role
|
||||
module:
|
||||
- block
|
||||
- migrate_drupal
|
|
@ -0,0 +1,32 @@
|
|||
id: d6_block_content_body_field
|
||||
label: Drupal 6 block content body field configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
# We do an empty source and a proper destination to have an idmap for
|
||||
# migration_dependencies.
|
||||
plugin: md_empty
|
||||
constants:
|
||||
entity_type: block_content
|
||||
bundle: basic
|
||||
name: body
|
||||
label: Body
|
||||
display_summary: false
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: 'constants/bundle'
|
||||
field_name: 'constants/name'
|
||||
label: 'constants/label'
|
||||
'settings/display_summary': 'constants/display_summary'
|
||||
destination:
|
||||
plugin: entity:field_config
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_block_content_type
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_block_content_type
|
||||
module:
|
||||
- block_content
|
||||
- field
|
||||
- migrate_drupal
|
|
@ -0,0 +1,20 @@
|
|||
id: d6_block_content_type
|
||||
label: Drupal 6 block content type
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
# We do an empty source and a proper destination to have an idmap for
|
||||
# migration_dependencies.
|
||||
plugin: md_empty
|
||||
constants:
|
||||
id: basic
|
||||
label: Basic
|
||||
process:
|
||||
id: 'constants/id'
|
||||
label: 'constants/label'
|
||||
destination:
|
||||
plugin: entity:block_content_type
|
||||
dependencies:
|
||||
module:
|
||||
- block_content
|
||||
- migrate_drupal
|
|
@ -0,0 +1,30 @@
|
|||
id: d6_book
|
||||
label: Drupal 6 books
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_book
|
||||
process:
|
||||
nid: nid
|
||||
'book/bid': bid
|
||||
'book/weight': weight
|
||||
'book/pid':
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: process
|
||||
source: plid
|
||||
-
|
||||
plugin: migration
|
||||
migration: d6_book
|
||||
destination:
|
||||
plugin: book
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_node
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_node
|
||||
module:
|
||||
- book
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,21 @@
|
|||
id: d6_book_settings
|
||||
label: Drupal 6 book configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- book_child_type
|
||||
- book_block_mode
|
||||
- book_allowed_types
|
||||
process:
|
||||
child_type: book_child_type
|
||||
'block/navigation/mode': book_block_mode
|
||||
allowed_types: book_allowed_types
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: book.settings
|
||||
dependencies:
|
||||
module:
|
||||
- book
|
||||
- migrate_drupal
|
|
@ -0,0 +1,24 @@
|
|||
id: d6_cck_field_revision
|
||||
label: Drupal 6 field revisions
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
load:
|
||||
plugin: drupal_entity
|
||||
bundle_migration: d6_node_type
|
||||
source:
|
||||
plugin: d6_cck_field_revision
|
||||
process:
|
||||
vid: vid
|
||||
destination:
|
||||
plugin: entity_revision:node
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_cck_field_values
|
||||
- d6_node_revision
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_cck_field_values
|
||||
- migrate.migration.d6_node_revision
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,29 @@
|
|||
id: d6_cck_field_values
|
||||
label: Drupal 6 field values
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
load:
|
||||
plugin: drupal_entity
|
||||
bundle_migration: d6_node_type
|
||||
source:
|
||||
plugin: d6_cck_field_values
|
||||
process:
|
||||
nid:
|
||||
plugin: migration
|
||||
migration: d6_node
|
||||
source: nid
|
||||
destination:
|
||||
plugin: entity:node
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_node
|
||||
- d6_field_formatter_settings
|
||||
- d6_field_instance_widget_settings
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_field_formatter_settings
|
||||
- migrate.migration.d6_field_instance_widget_settings
|
||||
- migrate.migration.d6_node
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,57 @@
|
|||
id: d6_comment
|
||||
label: Drupal 6 comments
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_comment
|
||||
constants:
|
||||
entity_type: node
|
||||
process:
|
||||
cid: cid
|
||||
pid:
|
||||
plugin: migration
|
||||
migration: d6_comment
|
||||
source: pid
|
||||
entity_id: nid
|
||||
entity_type: 'constants/entity_type'
|
||||
# field_name & comment_type is calculated in
|
||||
# \Drupal\migrate_drupal\Plugin\migrate\source\d6\Comment::prepareRow()
|
||||
field_name: field_name
|
||||
comment_type: comment_type
|
||||
subject: subject
|
||||
uid: uid
|
||||
name: name
|
||||
mail: mail
|
||||
homepage: homepage
|
||||
hostname: hostname
|
||||
created: timestamp
|
||||
changed: timestamp
|
||||
status: status #In D6, published=0. We reverse the value in prepareRow.
|
||||
thread: thread
|
||||
'comment_body/value': comment
|
||||
'comment_body/format':
|
||||
plugin: migration
|
||||
migration: d6_filter_format
|
||||
source: format
|
||||
destination:
|
||||
plugin: entity:comment
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_node
|
||||
- d6_comment_type
|
||||
- d6_user
|
||||
- d6_comment_entity_display
|
||||
- d6_comment_entity_form_display
|
||||
- d6_filter_format
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_comment_entity_display
|
||||
- migrate.migration.d6_comment_entity_form_display
|
||||
- migrate.migration.d6_comment_type
|
||||
- migrate.migration.d6_filter_format
|
||||
- migrate.migration.d6_node
|
||||
- migrate.migration.d6_user
|
||||
module:
|
||||
- comment
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,32 @@
|
|||
id: d6_comment_entity_display
|
||||
label: Drupal 6 comment display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_comment_variable
|
||||
constants:
|
||||
entity_type: node
|
||||
field_name: comment
|
||||
view_mode: default
|
||||
options:
|
||||
label: hidden
|
||||
type: comment_default
|
||||
weight: 20
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
field_name: 'constants/field_name'
|
||||
view_mode: 'constants/view_mode'
|
||||
options: 'constants/options'
|
||||
|
||||
bundle: node_type
|
||||
destination:
|
||||
plugin: component_entity_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_comment_field_instance
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_comment_field_instance
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,31 @@
|
|||
id: d6_comment_entity_form_display
|
||||
label: Drupal 6 comment field form display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_comment_variable
|
||||
constants:
|
||||
entity_type: node
|
||||
field_name: comment
|
||||
form_mode: default
|
||||
options:
|
||||
type: comment_default
|
||||
weight: 20
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
field_name: 'constants/field_name'
|
||||
form_mode: 'constants/form_mode'
|
||||
options: 'constants/options'
|
||||
|
||||
bundle: node_type
|
||||
destination:
|
||||
plugin: component_entity_form_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_comment_field_instance
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_comment_field_instance
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,38 @@
|
|||
id: d6_comment_entity_form_display_subject
|
||||
label: Drupal 6 comment subject form display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_comment_variable_per_comment_type
|
||||
constants:
|
||||
entity_type: comment
|
||||
field_name: subject
|
||||
form_mode: default
|
||||
options:
|
||||
type: string_textfield
|
||||
weight: 10
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
field_name: 'constants/field_name'
|
||||
form_mode: 'constants/form_mode'
|
||||
options: 'constants/options'
|
||||
|
||||
hidden:
|
||||
plugin: static_map
|
||||
source: comment_type
|
||||
default_value: false
|
||||
map:
|
||||
comment_no_subject: true # Hide subject field
|
||||
comment: false
|
||||
bundle: comment_type
|
||||
destination:
|
||||
plugin: component_entity_form_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_comment_type
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_comment_type
|
||||
module:
|
||||
- comment
|
||||
- migrate_drupal
|
|
@ -0,0 +1,27 @@
|
|||
id: d6_comment_field
|
||||
label: Drupal 6 comment field configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_comment_variable_per_comment_type
|
||||
constants:
|
||||
entity_type: node
|
||||
type: comment
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
field_name: comment_type
|
||||
type: 'constants/type'
|
||||
'settings/comment_type': comment_type
|
||||
destination:
|
||||
plugin: md_entity:field_storage_config
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_comment_type
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_comment_type
|
||||
module:
|
||||
- comment
|
||||
- field
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,42 @@
|
|||
id: d6_comment_field_instance
|
||||
label: Drupal 6 comment field instance configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_comment_variable
|
||||
constants:
|
||||
entity_type: node
|
||||
label: Comments
|
||||
required: true
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
label: 'constants/label'
|
||||
required: 'constants/required'
|
||||
|
||||
field_name:
|
||||
plugin: static_map
|
||||
source: comment_subject_field
|
||||
default_value: comment
|
||||
map:
|
||||
0: comment_no_subject
|
||||
bundle: node_type
|
||||
'default_value/0/status': comment
|
||||
'settings/default_mode': comment_default_mode
|
||||
'settings/per_page': comment_default_per_page
|
||||
'settings/anonymous': comment_anonymous
|
||||
'settings/form_location': comment_form_location
|
||||
'settings/preview': comment_preview
|
||||
destination:
|
||||
plugin: entity:field_config
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_comment_field
|
||||
- d6_node_type
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_comment_field
|
||||
- migrate.migration.d6_node_type
|
||||
module:
|
||||
- field
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,20 @@
|
|||
id: d6_comment_type
|
||||
label: Drupal 6 comment type
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_comment_variable_per_comment_type
|
||||
constants:
|
||||
entity_type: node
|
||||
process:
|
||||
target_entity_type_id: 'constants/entity_type'
|
||||
id: comment_type
|
||||
label: label
|
||||
description: description
|
||||
destination:
|
||||
plugin: entity:comment_type
|
||||
dependencies:
|
||||
module:
|
||||
- comment
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,26 @@
|
|||
id: d6_contact_category
|
||||
label: Drupal 6 contact category configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_contact_category
|
||||
process:
|
||||
id:
|
||||
-
|
||||
plugin: machine_name
|
||||
source: category
|
||||
-
|
||||
plugin: dedupe_entity
|
||||
entity_type: user_role
|
||||
field: cid
|
||||
length: 32
|
||||
label: category
|
||||
recipients: recipients
|
||||
reply: reply
|
||||
weight: weight
|
||||
destination:
|
||||
plugin: entity:contact_form
|
||||
dependencies:
|
||||
module:
|
||||
- contact
|
||||
- migrate_drupal
|
|
@ -0,0 +1,28 @@
|
|||
id: d6_contact_settings
|
||||
label: Drupal 6 contact configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_contact_settings
|
||||
variables:
|
||||
- contact_default_status
|
||||
- contact_hourly_threshold
|
||||
process:
|
||||
user_default_enabled: contact_default_status
|
||||
'flood/limit': contact_hourly_threshold
|
||||
default_form:
|
||||
plugin: migration
|
||||
migration: d6_contact_category
|
||||
source: default_category
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: contact.settings
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_contact_category
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_contact_category
|
||||
module:
|
||||
- contact
|
||||
- migrate_drupal
|
|
@ -0,0 +1,31 @@
|
|||
id: d6_custom_block
|
||||
label: Drupal 6 custom blocks
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_box
|
||||
constants:
|
||||
type: basic
|
||||
process:
|
||||
id: bid
|
||||
type: 'constants/type'
|
||||
info: info
|
||||
'body/format':
|
||||
plugin: migration
|
||||
migration: d6_filter_format
|
||||
source: format
|
||||
'body/value': body
|
||||
destination:
|
||||
plugin: entity:block_content
|
||||
no_stub: true
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_filter_format
|
||||
- d6_block_content_body_field
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_block_content_body_field
|
||||
- migrate.migration.d6_filter_format
|
||||
module:
|
||||
- block_content
|
||||
- migrate_drupal
|
|
@ -0,0 +1,24 @@
|
|||
id: d6_date_formats
|
||||
label: Drupal 6 date format configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable_multirow
|
||||
variables:
|
||||
- date_format_long
|
||||
- date_format_medium
|
||||
- date_format_short
|
||||
process:
|
||||
id:
|
||||
plugin: static_map
|
||||
source: name
|
||||
map:
|
||||
date_format_long: long
|
||||
date_format_short: short
|
||||
date_format_medium: medium
|
||||
pattern: value
|
||||
destination:
|
||||
plugin: entity:date_format
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
|
@ -0,0 +1,17 @@
|
|||
id: d6_dblog_settings
|
||||
label: Drupal 6 database logging configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- dblog_row_limit
|
||||
process:
|
||||
row_limit: dblog_row_limit
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: dblog.settings
|
||||
dependencies:
|
||||
module:
|
||||
- dblog
|
||||
- migrate_drupal
|
|
@ -0,0 +1,138 @@
|
|||
id: d6_field
|
||||
label: Drupal 6 field configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_field
|
||||
constants:
|
||||
entity_type: node
|
||||
langcode: en
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
status: active
|
||||
langcode: 'constants/langcode'
|
||||
field_name: field_name
|
||||
type:
|
||||
-
|
||||
plugin: static_map
|
||||
source:
|
||||
- type
|
||||
- widget_type
|
||||
map:
|
||||
number_integer:
|
||||
number: integer
|
||||
optionwidgets_select: list_integer
|
||||
optionwidgets_buttons: list_integer
|
||||
optionwidgets_onoff: boolean
|
||||
number_decimal:
|
||||
number: decimal
|
||||
optionwidgets_select: list_float
|
||||
optionwidgets_buttons: list_float
|
||||
optionwidgets_onoff: boolean
|
||||
number_float:
|
||||
number: float
|
||||
optionwidgets_select: list_float
|
||||
optionwidgets_buttons: list_float
|
||||
optionwidgets_onoff: boolean
|
||||
text:
|
||||
optionwidgets_select: list_string
|
||||
optionwidgets_buttons: list_string
|
||||
optionwidgets_onoff: boolean
|
||||
text_textfield: text
|
||||
text_textarea: text_long
|
||||
email:
|
||||
email_textfield: email
|
||||
filefield:
|
||||
imagefield_widget: image
|
||||
filefield_widget: file
|
||||
date:
|
||||
date_select: datetime
|
||||
datestamp:
|
||||
date_select: datetime
|
||||
datetime:
|
||||
date_select: datetime
|
||||
fr_phone:
|
||||
phone_textfield: telephone
|
||||
be_phone:
|
||||
phone_textfield: telephone
|
||||
it_phone:
|
||||
phone_textfield: telephone
|
||||
el_phone:
|
||||
phone_textfield: telephone
|
||||
ch_phone:
|
||||
phone_textfield: telephone
|
||||
ca_phone:
|
||||
phone_textfield: telephone
|
||||
cr_phone:
|
||||
phone_textfield: telephone
|
||||
pa_phone:
|
||||
phone_textfield: telephone
|
||||
gb_phone:
|
||||
phone_textfield: telephone
|
||||
ru_phone:
|
||||
phone_textfield: telephone
|
||||
ua_phone:
|
||||
phone_textfield: telephone
|
||||
es_phone:
|
||||
phone_textfield: telephone
|
||||
au_phone:
|
||||
phone_textfield: telephone
|
||||
cs_phone:
|
||||
phone_textfield: telephone
|
||||
hu_phone:
|
||||
phone_textfield: telephone
|
||||
pl_phone:
|
||||
phone_textfield: telephone
|
||||
nl_phone:
|
||||
phone_textfield: telephone
|
||||
se_phone:
|
||||
phone_textfield: telephone
|
||||
za_phone:
|
||||
phone_textfield: telephone
|
||||
il_phone:
|
||||
phone_textfield: telephone
|
||||
nz_phone:
|
||||
phone_textfield: telephone
|
||||
br_phone:
|
||||
phone_textfield: telephone
|
||||
cl_phone:
|
||||
phone_textfield: telephone
|
||||
cn_phone:
|
||||
phone_textfield: telephone
|
||||
hk_phone:
|
||||
phone_textfield: telephone
|
||||
mo_phone:
|
||||
phone_textfield: telephone
|
||||
ph_phone:
|
||||
phone_textfield: telephone
|
||||
sg_phone:
|
||||
phone_textfield: telephone
|
||||
jo_phone:
|
||||
phone_textfield: telephone
|
||||
eg_phone:
|
||||
phone_textfield: telephone
|
||||
pk_phone:
|
||||
phone_textfield: telephone
|
||||
int_phone:
|
||||
phone_textfield: telephone
|
||||
cardinality:
|
||||
plugin: static_map
|
||||
bypass: true
|
||||
source: multiple
|
||||
map:
|
||||
0: 1
|
||||
1: -1
|
||||
settings:
|
||||
plugin: field_settings
|
||||
source:
|
||||
- @type
|
||||
- global_settings
|
||||
- widget_settings
|
||||
|
||||
destination:
|
||||
plugin: md_entity:field_storage_config
|
||||
dependencies:
|
||||
module:
|
||||
- field
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,270 @@
|
|||
id: d6_field_formatter_settings
|
||||
label: Drupal 6 field formatter configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_field_instance_per_view_mode
|
||||
constants:
|
||||
entity_type: node
|
||||
third_party_settings: { }
|
||||
|
||||
process:
|
||||
# We skip field types that don't exist because they weren't migrated by the
|
||||
# field migration.
|
||||
field_type_exists:
|
||||
-
|
||||
plugin: migration
|
||||
migration: d6_field
|
||||
source:
|
||||
- field_name
|
||||
-
|
||||
plugin: extract
|
||||
index:
|
||||
- 1
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: type_name
|
||||
view_mode:
|
||||
-
|
||||
plugin: migration
|
||||
migration: d6_view_modes
|
||||
source:
|
||||
- view_mode
|
||||
-
|
||||
plugin: extract
|
||||
index:
|
||||
- 1
|
||||
-
|
||||
plugin: static_map
|
||||
bypass: true
|
||||
map:
|
||||
full: default
|
||||
field_name: field_name
|
||||
"options/label": label
|
||||
"options/weight": weight
|
||||
"options/type":
|
||||
-
|
||||
plugin: static_map
|
||||
bypass: true
|
||||
source:
|
||||
- type
|
||||
- 'display_settings/format'
|
||||
map:
|
||||
text:
|
||||
default: text_default
|
||||
trimmed: text_trimmed
|
||||
plain: basic_string
|
||||
number_integer:
|
||||
default: number_integer
|
||||
us_0: number_integer
|
||||
be_0: number_integer
|
||||
fr_0: number_integer
|
||||
unformatted: number_unformatted
|
||||
number_float:
|
||||
default: number_decimal
|
||||
us_0: number_decimal
|
||||
us_1: number_decimal
|
||||
us_2: number_decimal
|
||||
be_0: number_decimal
|
||||
be_1: number_decimal
|
||||
be_2: number_decimal
|
||||
fr_0: number_decimal
|
||||
fr_1: number_decimal
|
||||
fr_2: number_decimal
|
||||
unformatted: number_unformatted
|
||||
number_decimal:
|
||||
default: number_decimal
|
||||
us_0: number_decimal
|
||||
us_1: number_decimal
|
||||
us_2: number_decimal
|
||||
be_0: number_decimal
|
||||
be_1: number_decimal
|
||||
be_2: number_decimal
|
||||
fr_0: number_decimal
|
||||
fr_1: number_decimal
|
||||
fr_2: number_decimal
|
||||
unformatted: number_unformatted
|
||||
email:
|
||||
default: email_mailto
|
||||
spamspan: email_mailto
|
||||
contact: email_mailto
|
||||
plain: basic_string
|
||||
filefield:
|
||||
default: file_default
|
||||
url_plain: file_url_plain
|
||||
path_plain: file_url_plain
|
||||
image_plain: image
|
||||
image_nodelink: image
|
||||
image_imagelink: image
|
||||
fr_phone:
|
||||
default: basic_string
|
||||
be_phone:
|
||||
default: basic_string
|
||||
it_phone:
|
||||
default: basic_string
|
||||
el_phone:
|
||||
default: basic_string
|
||||
ch_phone:
|
||||
default: basic_string
|
||||
ca_phone:
|
||||
default: basic_string
|
||||
cr_phone:
|
||||
default: basic_string
|
||||
pa_phone:
|
||||
default: basic_string
|
||||
gb_phone:
|
||||
default: basic_string
|
||||
ru_phone:
|
||||
default: basic_string
|
||||
ua_phone:
|
||||
default: basic_string
|
||||
es_phone:
|
||||
default: basic_string
|
||||
au_phone:
|
||||
default: basic_string
|
||||
cs_phone:
|
||||
default: basic_string
|
||||
hu_phone:
|
||||
default: basic_string
|
||||
pl_phone:
|
||||
default: basic_string
|
||||
nl_phone:
|
||||
default: basic_string
|
||||
se_phone:
|
||||
default: basic_string
|
||||
za_phone:
|
||||
default: basic_string
|
||||
il_phone:
|
||||
default: basic_string
|
||||
nz_phone:
|
||||
default: basic_string
|
||||
br_phone:
|
||||
default: basic_string
|
||||
cl_phone:
|
||||
default: basic_string
|
||||
cn_phone:
|
||||
default: basic_string
|
||||
hk_phone:
|
||||
default: basic_string
|
||||
mo_phone:
|
||||
default: basic_string
|
||||
ph_phone:
|
||||
default: basic_string
|
||||
sg_phone:
|
||||
default: basic_string
|
||||
jo_phone:
|
||||
default: basic_string
|
||||
eg_phone:
|
||||
default: basic_string
|
||||
pk_phone:
|
||||
default: basic_string
|
||||
int_phone:
|
||||
default: basic_string
|
||||
-
|
||||
plugin: field_type_defaults
|
||||
"options/settings":
|
||||
-
|
||||
plugin: static_map
|
||||
bypass: true
|
||||
source:
|
||||
- module
|
||||
- 'display_settings/format'
|
||||
map:
|
||||
link:
|
||||
default:
|
||||
trim_length: '80'
|
||||
url_only: 0
|
||||
url_plain: 0
|
||||
rel: 0
|
||||
target: 0
|
||||
plain:
|
||||
trim_length: '80'
|
||||
url_only: 1
|
||||
url_plain: 1
|
||||
rel: 0
|
||||
target: 0
|
||||
absolute:
|
||||
trim_length: '80'
|
||||
url_only: 1
|
||||
url_plain: 1
|
||||
rel: 0
|
||||
target: 0
|
||||
title_plain: #can't support title as plain text.
|
||||
trim_length: '80'
|
||||
url_only: 1
|
||||
url_plain: 1
|
||||
rel: 0
|
||||
target: 0
|
||||
url:
|
||||
trim_length: '80'
|
||||
url_only: 1
|
||||
url_plain: 0
|
||||
rel: 0
|
||||
target: 0
|
||||
short: #can't support hardcoded link text?
|
||||
trim_length: '80'
|
||||
url_only: 0
|
||||
url_plain: 0
|
||||
rel: 0
|
||||
target: 0
|
||||
label: # can't support label as link text?
|
||||
trim_length: '80'
|
||||
url_only: 0
|
||||
url_plain: 0
|
||||
rel: 0
|
||||
target: 0
|
||||
separate:
|
||||
trim_length: '80'
|
||||
rel: 0
|
||||
target: 0
|
||||
filefield:
|
||||
image_plain:
|
||||
image_style: ''
|
||||
image_link: ''
|
||||
image_nodelink:
|
||||
image_style: ''
|
||||
image_link: content
|
||||
image_imagelink:
|
||||
image_style: ''
|
||||
image_link: file
|
||||
date:
|
||||
default:
|
||||
format_type: fallback
|
||||
timezone_override: ''
|
||||
format_interval:
|
||||
format_type: fallback
|
||||
timezone_override: ''
|
||||
long:
|
||||
format_type: long
|
||||
timezone_override: ''
|
||||
medium:
|
||||
format_type: medium
|
||||
timezone_override: ''
|
||||
short:
|
||||
format_type: short
|
||||
timezone_override: ''
|
||||
text:
|
||||
trimmed:
|
||||
trim_length: 600
|
||||
string:
|
||||
default:
|
||||
link_to_entity: false
|
||||
-
|
||||
plugin: field_formatter_settings_defaults
|
||||
"options/third_party_settings": 'constants/third_party_settings'
|
||||
|
||||
destination:
|
||||
plugin: component_entity_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_field_instance
|
||||
- d6_view_modes
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_field_instance
|
||||
- migrate.migration.d6_view_modes
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,60 @@
|
|||
id: d6_field_instance
|
||||
label: Drupal 6 field instance configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_field_instance
|
||||
constants:
|
||||
entity_type: node
|
||||
|
||||
process:
|
||||
# We skip field types that don't exist because they weren't migrated by the
|
||||
# field migration.
|
||||
field_type_exists:
|
||||
-
|
||||
plugin: migration
|
||||
migration: d6_field
|
||||
source:
|
||||
- field_name
|
||||
-
|
||||
plugin: extract
|
||||
index:
|
||||
- 1
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
entity_type: 'constants/entity_type'
|
||||
field_name: field_name
|
||||
bundle: type_name
|
||||
label: label
|
||||
description: description
|
||||
required: required
|
||||
status: active
|
||||
settings:
|
||||
plugin: d6_field_field_settings
|
||||
source:
|
||||
- widget_type
|
||||
- widget_settings
|
||||
- global_settings
|
||||
|
||||
default_value_callback: ''
|
||||
default_value:
|
||||
plugin: d6_field_instance_defaults
|
||||
source:
|
||||
- widget_type
|
||||
- widget_settings
|
||||
|
||||
destination:
|
||||
plugin: entity:field_config
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_node_type
|
||||
- d6_field
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_field
|
||||
- migrate.migration.d6_node_type
|
||||
module:
|
||||
- field
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,68 @@
|
|||
id: d6_field_instance_widget_settings
|
||||
label: Drupal 6 field instance widget configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_field_instance_per_form_display
|
||||
constants:
|
||||
entity_type: node
|
||||
form_mode: default
|
||||
third_party_settings: { }
|
||||
|
||||
process:
|
||||
# We skip field types that don't exist because they weren't migrated by the
|
||||
# field migration.
|
||||
field_type_exists:
|
||||
-
|
||||
plugin: migration
|
||||
migration: d6_field
|
||||
source:
|
||||
- field_name
|
||||
-
|
||||
plugin: extract
|
||||
index:
|
||||
- 1
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
bundle: type_name
|
||||
form_mode: 'constants/form_mode'
|
||||
field_name: field_name
|
||||
entity_type: 'constants/entity_type'
|
||||
'options/weight': weight
|
||||
'options/type':
|
||||
type:
|
||||
plugin: static_map
|
||||
bypass: true
|
||||
source: widget_type
|
||||
map:
|
||||
text_textfield: text_textfield
|
||||
number: number
|
||||
email_textfield: email_default
|
||||
date_select: datetime_default
|
||||
date_text: datetime_default
|
||||
filefield_widget: file_generic
|
||||
imagefield_widget: image_image
|
||||
phone_textfield: telephone_default
|
||||
optionwidgets_onoff: boolean_checkbox
|
||||
optionwidgets_buttons: options_buttons
|
||||
optionwidgets_select: options_select
|
||||
'options/settings':
|
||||
-
|
||||
plugin: field_instance_widget_settings
|
||||
source:
|
||||
- widget_type
|
||||
- widget_settings
|
||||
'options/third_party_settings': 'constants/third_party_settings'
|
||||
|
||||
destination:
|
||||
plugin: component_entity_form_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_field_instance
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_field_instance
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,29 @@
|
|||
# Every migration that saves into {file_managed} must have the d6_file
|
||||
# migration as an optional dependency to ensure d6_file runs first.
|
||||
id: d6_file
|
||||
label: Drupal 6 files
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_file
|
||||
process:
|
||||
fid: fid
|
||||
filename: filename
|
||||
uri:
|
||||
plugin: file_uri
|
||||
source:
|
||||
- filepath
|
||||
- file_directory_path
|
||||
- temp_directory_path
|
||||
- is_public
|
||||
filemime: filemime
|
||||
filesize: filesize
|
||||
status: status
|
||||
changed: timestamp
|
||||
uid: uid
|
||||
destination:
|
||||
plugin: entity:file
|
||||
dependencies:
|
||||
module:
|
||||
- file
|
||||
- migrate_drupal
|
|
@ -0,0 +1,21 @@
|
|||
id: d6_file_settings
|
||||
label: Drupal 6 file configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- file_description_type
|
||||
- file_description_length
|
||||
- file_icon_directory
|
||||
process:
|
||||
'description/type': file_description_type
|
||||
'description/length': file_description_length
|
||||
'icon/directory': file_icon_directory
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: file.settings
|
||||
dependencies:
|
||||
module:
|
||||
- file
|
||||
- migrate_drupal
|
|
@ -0,0 +1,49 @@
|
|||
id: d6_filter_format
|
||||
label: Drupal 6 filter format configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_filter_format
|
||||
process:
|
||||
format:
|
||||
-
|
||||
plugin: machine_name
|
||||
source: name
|
||||
-
|
||||
plugin: dedupe_entity
|
||||
entity_type: filter_format
|
||||
field: format
|
||||
length: 32
|
||||
name: name
|
||||
cache: cache
|
||||
filters:
|
||||
plugin: iterator
|
||||
source: filters
|
||||
key: @id
|
||||
process:
|
||||
id:
|
||||
plugin: static_map
|
||||
default_value: filter_null
|
||||
source:
|
||||
- module
|
||||
- delta
|
||||
map:
|
||||
filter:
|
||||
- filter_html
|
||||
- filter_autop
|
||||
- filter_url
|
||||
- filter_htmlcorrector
|
||||
- filter_html_escape
|
||||
php:
|
||||
- php_code
|
||||
settings: settings
|
||||
status:
|
||||
plugin: default_value
|
||||
default_value: true
|
||||
destination:
|
||||
plugin: entity:filter_format
|
||||
no_stub: true
|
||||
dependencies:
|
||||
module:
|
||||
- filter
|
||||
- migrate_drupal
|
|
@ -0,0 +1,35 @@
|
|||
id: d6_forum_settings
|
||||
label: Drupal 6 forum configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- forum_hot_topic
|
||||
- forum_per_page
|
||||
- forum_order
|
||||
- forum_block_num_0
|
||||
- forum_block_num_1
|
||||
- forum_nav_vocabulary
|
||||
process:
|
||||
'block/active/limit': forum_block_num_0
|
||||
'block/new/limit': forum_block_num_1
|
||||
'topics/hot_threshold': forum_hot_topic
|
||||
'topics/page_limit': forum_per_page
|
||||
'topics/order': forum_order
|
||||
vocabulary:
|
||||
plugin: migration
|
||||
migration: d6_taxonomy_vocabulary
|
||||
source: forum_nav_vocabulary
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: forum.settings
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_taxonomy_vocabulary
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_taxonomy_vocabulary
|
||||
module:
|
||||
- forum
|
||||
- migrate_drupal
|
|
@ -0,0 +1,19 @@
|
|||
id: d6_locale_settings
|
||||
label: Drupal 6 locale configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- locale_cache_strings
|
||||
- locale_js_directory
|
||||
process:
|
||||
cache_strings: locale_cache_strings
|
||||
'javascript/directory': locale_js_directory
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: locale.settings
|
||||
dependencies:
|
||||
module:
|
||||
- locale
|
||||
- migrate_drupal
|
|
@ -0,0 +1,16 @@
|
|||
id: d6_menu
|
||||
label: Drupal 6 menus
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_menu
|
||||
process:
|
||||
id: menu_name
|
||||
label: title
|
||||
description: description
|
||||
destination:
|
||||
plugin: entity:menu
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,53 @@
|
|||
id: d6_menu_links
|
||||
label: Drupal 6 menu links
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_menu_link
|
||||
constants:
|
||||
bundle: menu_link_content
|
||||
process:
|
||||
id: mlid
|
||||
bundle: 'constants/bundle'
|
||||
title: link_title
|
||||
description:
|
||||
plugin: extract
|
||||
source:
|
||||
- options
|
||||
index:
|
||||
- 0
|
||||
- attributes
|
||||
- title
|
||||
menu_name:
|
||||
plugin: migration
|
||||
migration: d6_menu
|
||||
source: menu_name
|
||||
'link/uri':
|
||||
plugin: internal_uri
|
||||
source:
|
||||
- link_path
|
||||
'link/options': options
|
||||
external: external
|
||||
weight: weight
|
||||
expanded: expanded
|
||||
enabled: enabled
|
||||
parent:
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: process
|
||||
source: plid
|
||||
-
|
||||
plugin: migration
|
||||
migration: d6_menu_links
|
||||
changed: updated
|
||||
destination:
|
||||
plugin: entity:menu_link_content
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_menu
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_menu
|
||||
module:
|
||||
- menu_link_content
|
||||
- migrate_drupal
|
|
@ -0,0 +1,21 @@
|
|||
id: d6_menu_settings
|
||||
label: Drupal 6 menu configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- menu_primary_links_source
|
||||
- menu_secondary_links_source
|
||||
- menu_override_parent_selector
|
||||
process:
|
||||
main_links: menu_primary_links_source
|
||||
secondary_links: menu_secondary_links_source
|
||||
override_parent_selector: menu_override_parent_selector
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: menu_ui.settings
|
||||
dependencies:
|
||||
module:
|
||||
- menu_ui
|
||||
- migrate_drupal
|
|
@ -0,0 +1,64 @@
|
|||
id: d6_node
|
||||
label: Drupal 6 nodes
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_node
|
||||
process:
|
||||
nid: nid
|
||||
vid: vid
|
||||
type: type
|
||||
langcode:
|
||||
plugin: default_value
|
||||
source: language
|
||||
default_value: "und"
|
||||
title: title
|
||||
uid: node_uid
|
||||
# Core migrations are designed for replacing the upgrade path and therefore
|
||||
# all node and user ids are preserved. For that reason we do not need to look-up
|
||||
# the user id for the node. If you're writing a custom migration, user ids will
|
||||
# vary from the source site and a lookup as shown below will be required.
|
||||
# plugin: migration
|
||||
# migration: d6_user
|
||||
# source: node_uid
|
||||
status: status
|
||||
created: created
|
||||
changed: changed
|
||||
promote: promote
|
||||
sticky: sticky
|
||||
'body/format':
|
||||
plugin: migration
|
||||
migration: d6_filter_format
|
||||
source: format
|
||||
'body/value': body
|
||||
'body/summary': teaser
|
||||
revision_uid: revision_uid
|
||||
revision_log: log
|
||||
revision_timestamp: timestamp
|
||||
|
||||
# unmapped d6 fields.
|
||||
# tnid
|
||||
# translate
|
||||
# moderate
|
||||
# comment
|
||||
|
||||
destination:
|
||||
plugin: entity:node
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user
|
||||
- d6_node_type
|
||||
- d6_node_settings
|
||||
- d6_filter_format
|
||||
optional:
|
||||
- d6_field_instance_widget_settings
|
||||
- d6_field_formatter_settings
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_filter_format
|
||||
- migrate.migration.d6_node_settings
|
||||
- migrate.migration.d6_node_type
|
||||
- migrate.migration.d6_user
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,48 @@
|
|||
id: d6_node_revision
|
||||
label: Drupal 6 node revisions
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_node_revision
|
||||
process:
|
||||
nid: nid
|
||||
vid: vid
|
||||
type: type
|
||||
langcode:
|
||||
plugin: default_value
|
||||
source: language
|
||||
default_value: "und"
|
||||
title: title
|
||||
uid: node_uid
|
||||
status: status
|
||||
created: created
|
||||
changed: changed
|
||||
promote: promote
|
||||
sticky: sticky
|
||||
'body/format':
|
||||
plugin: migration
|
||||
migration: d6_filter_format
|
||||
source: format
|
||||
'body/value': body
|
||||
'body/summary': teaser
|
||||
revision_uid: revision_uid
|
||||
revision_log: log
|
||||
revision_timestamp: timestamp
|
||||
|
||||
# unmapped d6 fields.
|
||||
# tnid
|
||||
# translate
|
||||
# moderate
|
||||
# comment
|
||||
|
||||
destination:
|
||||
plugin: entity_revision:node
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_node
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_node
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,25 @@
|
|||
id: d6_node_setting_promote
|
||||
label: Drupal 6 node type 'promote' setting
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_node_type
|
||||
constants:
|
||||
entity_type: node
|
||||
field_name: promote
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: type
|
||||
field_name: 'constants/field_name'
|
||||
'default_value/0/value': 'options/promote'
|
||||
destination:
|
||||
plugin: entity:base_field_override
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_node_type
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_node_type
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,25 @@
|
|||
id: d6_node_setting_status
|
||||
label: Drupal 6 node type 'status' setting
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_node_type
|
||||
constants:
|
||||
entity_type: node
|
||||
field_name: status
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: type
|
||||
field_name: 'constants/field_name'
|
||||
'default_value/0/value': 'options/status'
|
||||
destination:
|
||||
plugin: entity:base_field_override
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_node_type
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_node_type
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,25 @@
|
|||
id: d6_node_setting_sticky
|
||||
label: Drupal 6 node type 'sticky' setting
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_node_type
|
||||
constants:
|
||||
entity_type: node
|
||||
field_name: sticky
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: type
|
||||
field_name: 'constants/field_name'
|
||||
'default_value/0/value': 'options/sticky'
|
||||
destination:
|
||||
plugin: entity:base_field_override
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_node_type
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_node_type
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,17 @@
|
|||
id: d6_node_settings
|
||||
label: Drupal 6 node configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- node_admin_theme
|
||||
process:
|
||||
use_admin_theme: node_admin_theme
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: node.settings
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,28 @@
|
|||
id: d6_node_type
|
||||
label: Drupal 6 node type configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_node_type
|
||||
constants:
|
||||
preview: 1 # DRUPAL_OPTIONAL
|
||||
create_body: false
|
||||
process:
|
||||
type: type
|
||||
name: name
|
||||
module: module
|
||||
description: description
|
||||
help: help
|
||||
title_label: title_label
|
||||
'preview_mode': 'constants/preview'
|
||||
'display_submitted': display_submitted
|
||||
'new_revision': 'options/revision'
|
||||
'settings/node/options': options
|
||||
create_body: has_body
|
||||
create_body_label: body_label
|
||||
destination:
|
||||
plugin: entity:node_type
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,27 @@
|
|||
id: d6_profile_values
|
||||
label: Drupal 6 profile values
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_profile_field_values
|
||||
load:
|
||||
plugin: drupal_entity
|
||||
process:
|
||||
uid: uid
|
||||
destination:
|
||||
plugin: entity:user
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user
|
||||
- d6_user_profile_field_instance
|
||||
- d6_user_profile_entity_display
|
||||
- d6_user_profile_entity_form_display
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_user
|
||||
- migrate.migration.d6_user_profile_entity_display
|
||||
- migrate.migration.d6_user_profile_entity_form_display
|
||||
- migrate.migration.d6_user_profile_field_instance
|
||||
module:
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,29 @@
|
|||
id: d6_search_page
|
||||
label: Drupal 6 search page configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- node_rank_comments
|
||||
- node_rank_promote
|
||||
- node_rank_recent
|
||||
- node_rank_relevance
|
||||
- node_rank_sticky
|
||||
- node_rank_views
|
||||
constants:
|
||||
id: node_search
|
||||
path: node
|
||||
plugin: node_search
|
||||
process:
|
||||
id: 'constants/id'
|
||||
path: 'constants/path'
|
||||
plugin: 'constants/plugin'
|
||||
'configuration/rankings':
|
||||
plugin: d6_search_configuration_rankings
|
||||
destination:
|
||||
plugin: entity:search_page
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- search
|
|
@ -0,0 +1,26 @@
|
|||
id: d6_search_settings
|
||||
label: Drupal 6 search configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
constants:
|
||||
status: true
|
||||
variables:
|
||||
- minimum_word_size
|
||||
- overlap_cjk
|
||||
- search_cron_limit
|
||||
- search_tag_weights
|
||||
- search_and_or_limit
|
||||
process:
|
||||
'index/minimum_word_size': minimum_word_size
|
||||
'index/overlap_cjk': overlap_cjk
|
||||
'index/cron_limit': search_cron_limit
|
||||
logging: 'constants/status'
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: search.settings
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- search
|
|
@ -0,0 +1,25 @@
|
|||
id: d6_simpletest_settings
|
||||
label: Drupal 6 simpletest configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- simpletest_clear_results
|
||||
- simpletest_httpauth_method
|
||||
- simpletest_httpauth_password
|
||||
- simpletest_httpauth_username
|
||||
- simpletest_verbose
|
||||
process:
|
||||
clear_results: simpletest_clear_results
|
||||
'httpauth/method': simpletest_httpauth_method
|
||||
'httpauth/password': simpletest_httpauth_password
|
||||
'httpauth/username': simpletest_httpauth_username
|
||||
verbose: simpletest_verbose
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: simpletest.settings
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- simpletest
|
|
@ -0,0 +1,21 @@
|
|||
id: d6_statistics_settings
|
||||
label: Drupal 6 statistics configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- statistics_enable_access_log
|
||||
- statistics_flush_accesslog_timer
|
||||
- statistics_count_content_views
|
||||
process:
|
||||
'access_log/enabled': statistics_enable_access_log
|
||||
'access_log/max_lifetime': statistics_flush_accesslog_timer
|
||||
'count_content_views': statistics_count_content_views
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: statistics.settings
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- statistics
|
|
@ -0,0 +1,19 @@
|
|||
id: d6_syslog_settings
|
||||
label: Drupal 6 system log configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- syslog_identity
|
||||
- syslog_facility
|
||||
process:
|
||||
identity: syslog_identity
|
||||
facility: syslog_facility
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: syslog.settings
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- syslog
|
|
@ -0,0 +1,20 @@
|
|||
id: d6_system_cron
|
||||
label: Drupal 6 cron settings
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- cron_threshold_warning
|
||||
- cron_threshold_error
|
||||
- cron_last
|
||||
process:
|
||||
'threshold/requirements_warning': cron_threshold_warning
|
||||
'threshold/requirements_error': cron_threshold_error
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: system.cron
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,24 @@
|
|||
id: d6_system_file
|
||||
label: Drupal 6 file system configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- file_directory_temp
|
||||
- allow_insecure_uploads
|
||||
process:
|
||||
'path/temporary': file_directory_temp
|
||||
allow_insecure_uploads:
|
||||
plugin: static_map
|
||||
source: allow_insecure_uploads
|
||||
map:
|
||||
0: FALSE
|
||||
1: TRUE
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: system.file
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,17 @@
|
|||
id: d6_system_filter
|
||||
label: Drupal 6 filter configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- filter_allowed_protocols
|
||||
process:
|
||||
protocols: filter_allowed_protocols
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: system.filter
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,17 @@
|
|||
id: d6_system_image
|
||||
label: Drupal 6 image toolkit configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- image_toolkit
|
||||
process:
|
||||
toolkit: image_toolkit
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: system.image
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,17 @@
|
|||
id: d6_system_image_gd
|
||||
label: Drupal 6 image quality configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- image_jpeg_quality
|
||||
process:
|
||||
jpeg_quality: image_jpeg_quality
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: system.image.gd
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,25 @@
|
|||
id: d6_system_logging
|
||||
label: Drupal 6 system logging
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- error_level
|
||||
process:
|
||||
error_level:
|
||||
plugin: static_map
|
||||
source: error_level
|
||||
default_value: all
|
||||
map:
|
||||
0: hide
|
||||
1: some
|
||||
2: all
|
||||
3: verbose
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: system.logging
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,17 @@
|
|||
id: d6_system_maintenance
|
||||
label: Drupal 6 maintenance page configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- site_offline_message
|
||||
process:
|
||||
message: site_offline_message
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: system.maintenance
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,24 @@
|
|||
id: d6_system_performance
|
||||
label: Drupal 6 performance configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- preprocess_css
|
||||
- preprocess_js
|
||||
- cache_lifetime
|
||||
- cache
|
||||
- page_compression
|
||||
process:
|
||||
'css/preprocess': preprocess_css
|
||||
'js/preprocess': preprocess_js
|
||||
'cache/page/max_age': cache_lifetime
|
||||
'response/gzip': page_compression
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: system.performance
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,19 @@
|
|||
id: d6_system_rss
|
||||
label: Drupal 6 RSS configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- feed_default_items
|
||||
- feed_item_length
|
||||
process:
|
||||
'items/limit': feed_default_items
|
||||
'items/view_mode': feed_item_length
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: system.rss
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,45 @@
|
|||
id: d6_system_site
|
||||
label: Drupal 6 site configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
constants:
|
||||
slash: '/'
|
||||
variables:
|
||||
- site_name
|
||||
- site_mail
|
||||
- site_slogan
|
||||
- site_frontpage
|
||||
- site_403
|
||||
- site_404
|
||||
- drupal_weight_select_max
|
||||
- admin_compact_mode
|
||||
process:
|
||||
name: site_name
|
||||
mail: site_mail
|
||||
slogan: site_slogan
|
||||
'page/front':
|
||||
plugin: concat
|
||||
source:
|
||||
- constants/slash
|
||||
- site_frontpage
|
||||
'page/403':
|
||||
plugin: concat
|
||||
source:
|
||||
- constants/slash
|
||||
- site_403
|
||||
'page/404':
|
||||
plugin: concat
|
||||
source:
|
||||
- constants/slash
|
||||
- site_404
|
||||
weight_select_max: drupal_weight_select_max
|
||||
admin_compact_mode: admin_compact_mode
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: system.site
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- system
|
|
@ -0,0 +1,19 @@
|
|||
id: d6_taxonomy_settings
|
||||
label: Drupal 6 taxonomy configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- taxonomy_override_selector
|
||||
- taxonomy_terms_per_page_admin
|
||||
process:
|
||||
override_selector: taxonomy_override_selector
|
||||
terms_per_page_admin: taxonomy_terms_per_page_admin
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: taxonomy.settings
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- taxonomy
|
|
@ -0,0 +1,35 @@
|
|||
id: d6_taxonomy_term
|
||||
label: Drupal 6 taxonomy terms
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_taxonomy_term
|
||||
process:
|
||||
tid: tid
|
||||
vid:
|
||||
plugin: migration
|
||||
migration: d6_taxonomy_vocabulary
|
||||
source: vid
|
||||
name: name
|
||||
description: description
|
||||
weight: weight
|
||||
parent:
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: process
|
||||
source: parent
|
||||
-
|
||||
plugin: migration
|
||||
migration: d6_taxonomy_term
|
||||
changed: timestamp
|
||||
destination:
|
||||
plugin: entity:taxonomy_term
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_taxonomy_vocabulary
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_taxonomy_vocabulary
|
||||
module:
|
||||
- migrate_drupal
|
||||
- taxonomy
|
|
@ -0,0 +1,27 @@
|
|||
id: d6_taxonomy_vocabulary
|
||||
label: Drupal 6 taxonomy vocabularies
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_taxonomy_vocabulary
|
||||
process:
|
||||
vid:
|
||||
-
|
||||
plugin: machine_name
|
||||
source: name
|
||||
-
|
||||
plugin: dedupe_entity
|
||||
entity_type: taxonomy_vocabulary
|
||||
field: vid
|
||||
length: 32
|
||||
label: name
|
||||
name: name
|
||||
description: description
|
||||
hierarchy: hierarchy
|
||||
weight: weight
|
||||
destination:
|
||||
plugin: entity:taxonomy_vocabulary
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- taxonomy
|
|
@ -0,0 +1,30 @@
|
|||
id: d6_term_node
|
||||
label: Drupal 6 term/node relationships
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
load:
|
||||
plugin: d6_term_node
|
||||
|
||||
source:
|
||||
plugin: d6_term_node
|
||||
|
||||
process:
|
||||
nid: nid
|
||||
type: type
|
||||
# The actual field name is dynamic and will be added by the load plugin.
|
||||
|
||||
destination:
|
||||
plugin: entity:node
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_vocabulary_entity_display
|
||||
- d6_vocabulary_entity_form_display
|
||||
- d6_node
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_node
|
||||
- migrate.migration.d6_vocabulary_entity_display
|
||||
- migrate.migration.d6_vocabulary_entity_form_display
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,29 @@
|
|||
id: d6_term_node_revision
|
||||
label: Drupal 6 term/node relationship revisions
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
load:
|
||||
plugin: d6_term_node
|
||||
bundle_migration: d6_vocabulary_field
|
||||
|
||||
source:
|
||||
plugin: d6_term_node_revision
|
||||
|
||||
process:
|
||||
vid: vid
|
||||
type: type
|
||||
# The actual field name is dynamic and will be added by the load plugin.
|
||||
|
||||
destination:
|
||||
plugin: entity_revision:node
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_term_node
|
||||
- d6_node_revision
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_node_revision
|
||||
- migrate.migration.d6_term_node
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,17 @@
|
|||
id: d6_text_settings
|
||||
label: Drupal 6 teaser length configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- teaser_length
|
||||
process:
|
||||
default_summary_length: teaser_length
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: text.settings
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- text
|
|
@ -0,0 +1,25 @@
|
|||
id: d6_update_settings
|
||||
label: Drupal 6 update configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- update_max_fetch_attempts
|
||||
- update_fetch_url
|
||||
- update_notification_threshold
|
||||
- update_notify_emails
|
||||
- update_check_frequency
|
||||
process:
|
||||
'fetch/max_attempts': update_max_fetch_attempts
|
||||
'fetch/url': update_fetch_url
|
||||
'notification/threshold': update_notification_threshold
|
||||
'notification/emails': update_notify_emails
|
||||
'check/interval_days': update_check_frequency
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: update.settings
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- update
|
|
@ -0,0 +1,34 @@
|
|||
id: d6_upload
|
||||
label: Drupal 6 file uploads
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_upload
|
||||
|
||||
process:
|
||||
nid: nid
|
||||
vid: vid
|
||||
type: type
|
||||
upload:
|
||||
plugin: iterator
|
||||
source: upload
|
||||
process:
|
||||
target_id:
|
||||
plugin: migration
|
||||
migration: d6_file
|
||||
source: fid
|
||||
display: list
|
||||
description: description
|
||||
destination:
|
||||
plugin: entity:node
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_file
|
||||
- d6_node
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_file
|
||||
- migrate.migration.d6_node
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,33 @@
|
|||
id: d6_upload_entity_display
|
||||
label: Drupal 6 upload display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_upload_instance
|
||||
constants:
|
||||
entity_type: node
|
||||
view_mode: default
|
||||
name: upload
|
||||
type: file_default
|
||||
options:
|
||||
label: hidden
|
||||
settings: {}
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: node_type
|
||||
view_mode: 'constants/view_mode'
|
||||
field_name: 'constants/name'
|
||||
type: 'constants/type'
|
||||
options: 'constants/options'
|
||||
'options/type': @type
|
||||
destination:
|
||||
plugin: component_entity_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_upload_field_instance
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_upload_field_instance
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,34 @@
|
|||
id: d6_upload_entity_form_display
|
||||
label: Drupal 6 upload form display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_upload_instance
|
||||
constants:
|
||||
empty: {}
|
||||
entity_type: node
|
||||
form_mode: default
|
||||
name: upload
|
||||
type: file_generic
|
||||
options:
|
||||
settings:
|
||||
progress_indicator: throbber
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: node_type
|
||||
field_name: 'constants/name'
|
||||
form_mode: 'constants/form_mode'
|
||||
type: 'constants/type'
|
||||
options: 'constants/options'
|
||||
'options/type': @type
|
||||
destination:
|
||||
plugin: component_entity_form_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_upload_field_instance
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_upload_field_instance
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,29 @@
|
|||
id: d6_upload_field
|
||||
label: Drupal 6 upload field configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
# We do an empty source and a proper destination to have an idmap for
|
||||
# migration_dependencies.
|
||||
plugin: md_empty
|
||||
provider: upload
|
||||
constants:
|
||||
entity_type: node
|
||||
type: file
|
||||
name: upload
|
||||
cardinality: -1
|
||||
display_field: true
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
field_name: 'constants/name'
|
||||
type: 'constants/type'
|
||||
cardinality: 'constants/cardinality'
|
||||
'settings/display_field': 'constants/display_field'
|
||||
destination:
|
||||
plugin: md_entity:field_storage_config
|
||||
dependencies:
|
||||
module:
|
||||
- field
|
||||
- file
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,32 @@
|
|||
id: d6_upload_field_instance
|
||||
label: Drupal 6 upload field instance configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_upload_instance
|
||||
constants:
|
||||
entity_type: node
|
||||
name: upload
|
||||
settings:
|
||||
description_field: 1
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: node_type
|
||||
field_name: 'constants/name'
|
||||
settings: 'constants/settings'
|
||||
'settings/file_extensions': file_extensions
|
||||
'settings/max_filesize': max_filesize
|
||||
destination:
|
||||
plugin: entity:field_config
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_upload_field
|
||||
- d6_node_type
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_node_type
|
||||
- migrate.migration.d6_upload_field
|
||||
module:
|
||||
- field
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,27 @@
|
|||
id: d6_url_alias
|
||||
label: Drupal 6 URL aliases
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_url_alias
|
||||
constants:
|
||||
slash: '/'
|
||||
|
||||
process:
|
||||
source:
|
||||
plugin: concat
|
||||
source:
|
||||
- constants/slash
|
||||
- src
|
||||
alias:
|
||||
plugin: concat
|
||||
source:
|
||||
- constants/slash
|
||||
- dst
|
||||
langcode: language
|
||||
|
||||
destination:
|
||||
plugin: url_alias
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
|
@ -0,0 +1,43 @@
|
|||
id: d6_user
|
||||
label: Drupal 6 user accounts
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_user
|
||||
process:
|
||||
uid: uid
|
||||
name: name
|
||||
pass: pass
|
||||
mail: mail
|
||||
created: created
|
||||
access: access
|
||||
login: login
|
||||
status: status
|
||||
timezone:
|
||||
plugin: user_update_7002
|
||||
source: timezone
|
||||
preferred_langcode: language
|
||||
init: init
|
||||
roles:
|
||||
plugin: migration
|
||||
migration: d6_user_role
|
||||
source: roles
|
||||
user_picture:
|
||||
plugin: d6_user_picture
|
||||
source: uid
|
||||
destination:
|
||||
plugin: entity:user
|
||||
md5_passwords: true
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user_role
|
||||
optional:
|
||||
- d6_user_picture_file
|
||||
- d6_user_picture_entity_display
|
||||
- d6_user_picture_entity_form_display
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_user_role
|
||||
module:
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,29 @@
|
|||
id: d6_user_contact_settings
|
||||
label: Drupal 6 user contact settings
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_user
|
||||
constants:
|
||||
key: contact
|
||||
module: contact
|
||||
process:
|
||||
uid: uid
|
||||
key: 'constants/key'
|
||||
module: 'constants/module'
|
||||
settings:
|
||||
plugin: skip_row_if_not_set
|
||||
index: contact
|
||||
source: data
|
||||
|
||||
destination:
|
||||
plugin: user_data
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_user
|
||||
module:
|
||||
- contact
|
||||
- migrate_drupal
|
|
@ -0,0 +1,43 @@
|
|||
id: d6_user_mail
|
||||
label: Drupal 6 user mail configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- user_mail_status_activated_subject
|
||||
- user_mail_status_activated_body
|
||||
- user_mail_password_reset_subject
|
||||
- user_mail_password_reset_body
|
||||
- user_mail_status_deleted_subject
|
||||
- user_mail_status_deleted_body
|
||||
- user_mail_register_admin_created_subject
|
||||
- user_mail_register_admin_created_body
|
||||
- user_mail_register_no_approval_required_subject
|
||||
- user_mail_register_no_approval_required_body
|
||||
- user_mail_user_mail_register_pending_approval_subject
|
||||
- user_mail_user_mail_register_pending_approval_body
|
||||
- user_mail_status_blocked_subject
|
||||
- user_mail_status_blocked_body
|
||||
process:
|
||||
'status_activated/subject': user_mail_status_activated_subject
|
||||
'status_activated/body': user_mail_status_activated_body
|
||||
'password_reset/subject': user_mail_password_reset_subject
|
||||
'password_reset/body': user_mail_password_reset_body
|
||||
'cancel_confirm/subject': user_mail_status_deleted_subject
|
||||
'cancel_confirm/body': user_mail_status_deleted_body
|
||||
'register_admin_created/subject': user_mail_register_admin_created_subject
|
||||
'register_admin_created/body': user_mail_register_admin_created_body
|
||||
'register_no_approval_required/subject': user_mail_register_no_approval_required_subject
|
||||
'register_no_approval_required/body': user_mail_register_no_approval_required_body
|
||||
'register_pending_approval/subject': user_mail_user_mail_register_pending_approval_subject
|
||||
'register_pending_approval/body': user_mail_user_mail_register_pending_approval_body
|
||||
'status_blocked/subject': user_mail_status_blocked_subject
|
||||
'status_blocked/body': user_mail_status_blocked_body
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: user.mail
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,36 @@
|
|||
id: d6_user_picture_entity_display
|
||||
label: Drupal 6 user picture display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_user_picture_instance
|
||||
constants:
|
||||
entity_type: user
|
||||
bundle: user
|
||||
view_mode: default
|
||||
name: user_picture
|
||||
type: image
|
||||
options:
|
||||
label: hidden
|
||||
settings:
|
||||
image_style: ''
|
||||
image_link: content
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: 'constants/bundle'
|
||||
view_mode: 'constants/view_mode'
|
||||
field_name: 'constants/name'
|
||||
type: 'constants/type'
|
||||
options: 'constants/options'
|
||||
'options/type': @type
|
||||
destination:
|
||||
plugin: component_entity_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user_picture_field_instance
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_user_picture_field_instance
|
||||
module:
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,35 @@
|
|||
id: d6_user_picture_entity_form_display
|
||||
label: Drupal 6 user picture form display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_user_picture_instance
|
||||
constants:
|
||||
entity_type: user
|
||||
bundle: user
|
||||
form_mode: default
|
||||
name: user_picture
|
||||
type: image_image
|
||||
options:
|
||||
settings:
|
||||
progress_indicator: throbber
|
||||
preview_image_style: thumbnail
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: 'constants/bundle'
|
||||
field_name: 'constants/name'
|
||||
form_mode: 'constants/form_mode'
|
||||
type: 'constants/type'
|
||||
options: 'constants/options'
|
||||
'options/type': @type
|
||||
destination:
|
||||
plugin: component_entity_form_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user_picture_field_instance
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_user_picture_field_instance
|
||||
module:
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,26 @@
|
|||
id: d6_user_picture_field
|
||||
label: Drupal 6 user picture field configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
# We do an empty source and a proper destination to have an idmap for
|
||||
# dependencies.
|
||||
plugin: md_empty
|
||||
constants:
|
||||
entity_type: user
|
||||
type: image
|
||||
name: user_picture
|
||||
cardinality: 1
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
field_name: 'constants/name'
|
||||
type: 'constants/type'
|
||||
cardinality: 'constants/cardinality'
|
||||
destination:
|
||||
plugin: md_entity:field_storage_config
|
||||
dependencies:
|
||||
module:
|
||||
- field
|
||||
- image
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,37 @@
|
|||
id: d6_user_picture_field_instance
|
||||
label: Drupal 6 user picture field instance configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_user_picture_instance
|
||||
constants:
|
||||
entity_type: user
|
||||
bundle: user
|
||||
name: user_picture
|
||||
settings:
|
||||
file_extensions: 'png gif jpg jpeg'
|
||||
alt_field: false
|
||||
title_field: false
|
||||
min_resolution: ''
|
||||
alt_field_required: false
|
||||
title_field_required: false
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: 'constants/bundle'
|
||||
field_name: 'constants/name'
|
||||
settings: 'constants/settings'
|
||||
'settings/file_directory': file_directory
|
||||
'settings/max_filesize': max_filesize
|
||||
'settings/max_resolution': max_resolution
|
||||
destination:
|
||||
plugin: entity:field_config
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user_picture_field
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_user_picture_field
|
||||
module:
|
||||
- field
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,30 @@
|
|||
id: d6_user_picture_file
|
||||
label: Drupal 6 user pictures
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_user_picture_file
|
||||
constants:
|
||||
is_public: true
|
||||
process:
|
||||
filename: filename
|
||||
uid: uid
|
||||
uri:
|
||||
plugin: file_uri
|
||||
source:
|
||||
- picture
|
||||
- file_directory_path
|
||||
- temp_directory_path
|
||||
- 'constants/is_public'
|
||||
destination:
|
||||
plugin: entity:file
|
||||
source_path_property: picture
|
||||
migration_dependencies:
|
||||
# Every migration that saves into {file_managed} must have the d6_file
|
||||
# migration as an optional dependency to ensure it runs first.
|
||||
optional:
|
||||
- d6_file
|
||||
dependencies:
|
||||
module:
|
||||
- file
|
||||
- migrate_drupal
|
|
@ -0,0 +1,44 @@
|
|||
id: d6_user_profile_entity_display
|
||||
label: Drupal 6 user profile display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_profile_field
|
||||
constants:
|
||||
entity_type: user
|
||||
bundle: user
|
||||
view_mode: default
|
||||
options:
|
||||
label: hidden
|
||||
settings: {}
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: 'constants/bundle'
|
||||
view_mode: 'constants/view_mode'
|
||||
field_name: name
|
||||
type:
|
||||
plugin: static_map
|
||||
source: type
|
||||
map:
|
||||
checkbox: list_default
|
||||
date: datetime_default
|
||||
list: text_default
|
||||
selection: list_default
|
||||
textfield: text_default
|
||||
textarea: text_default
|
||||
url: link_default
|
||||
options: 'constants/options'
|
||||
'options/type': @type
|
||||
hidden:
|
||||
plugin: static_map
|
||||
source: visibility
|
||||
default_value: false
|
||||
map:
|
||||
1: true # PROFILE_PRIVATE
|
||||
4: true # PROFILE_HIDDEN
|
||||
destination:
|
||||
plugin: component_entity_display
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,53 @@
|
|||
id: d6_user_profile_entity_form_display
|
||||
label: Drupal 6 user profile form display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_profile_field
|
||||
constants:
|
||||
empty: {}
|
||||
entity_type: user
|
||||
bundle: user
|
||||
form_mode: default
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: 'constants/bundle'
|
||||
field_name: name
|
||||
form_mode: 'constants/form_mode'
|
||||
type:
|
||||
plugin: static_map
|
||||
source: type
|
||||
map:
|
||||
checkbox: boolean_checkbox
|
||||
date: datetime_default
|
||||
list: text_textfield
|
||||
selection: options_select
|
||||
textfield: text_textfield
|
||||
textarea: text_textarea
|
||||
url: link_default
|
||||
options: 'constants/options'
|
||||
'options/type': @type
|
||||
'options/settings':
|
||||
plugin: field_instance_widget_settings
|
||||
source:
|
||||
- @type
|
||||
- 'constants/empty' # we don't have any settings.
|
||||
'options/settings/display_label': # Single on/off checkboxes need to have display_label = true otherwise their label doesn't show.
|
||||
plugin: static_map
|
||||
default_value: false
|
||||
source: type
|
||||
map:
|
||||
checkbox: true
|
||||
hidden:
|
||||
plugin: static_map
|
||||
source: visibility
|
||||
default_value: false
|
||||
map:
|
||||
1: true # PROFILE_PRIVATE
|
||||
4: true # PROFILE_HIDDEN
|
||||
destination:
|
||||
plugin: component_entity_form_display
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,39 @@
|
|||
id: d6_user_profile_field
|
||||
label: Drupal 6 user profile field configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_profile_field
|
||||
constants:
|
||||
entity_type: user
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
field_name: name
|
||||
type:
|
||||
plugin: static_map
|
||||
source: type
|
||||
map:
|
||||
checkbox: boolean
|
||||
date: datetime
|
||||
list: text
|
||||
selection: list_string
|
||||
textfield: text
|
||||
textarea: text_long
|
||||
url: link
|
||||
settings:
|
||||
plugin: d6_profile_field_settings
|
||||
source: type
|
||||
'settings/allowed_values': options
|
||||
cardinality:
|
||||
plugin: static_map
|
||||
default_value: 1
|
||||
source: type
|
||||
map:
|
||||
list: -1
|
||||
destination:
|
||||
plugin: md_entity:field_storage_config
|
||||
dependencies:
|
||||
module:
|
||||
- field
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,28 @@
|
|||
id: d6_user_profile_field_instance
|
||||
label: Drupal 6 user profile field instance configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_profile_field
|
||||
constants:
|
||||
entity_type: user
|
||||
bundle: user
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: 'constants/bundle'
|
||||
label: title
|
||||
description: explanation
|
||||
field_name: name
|
||||
required: required
|
||||
destination:
|
||||
plugin: entity:field_config
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user_profile_field
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_user_profile_field
|
||||
module:
|
||||
- field
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,52 @@
|
|||
id: d6_user_role
|
||||
label: Drupal 6 user roles
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_user_role
|
||||
process:
|
||||
id:
|
||||
-
|
||||
plugin: machine_name
|
||||
source: name
|
||||
-
|
||||
plugin: dedupe_entity
|
||||
entity_type: user_role
|
||||
field: id
|
||||
length: 32
|
||||
-
|
||||
plugin: user_update_8002
|
||||
label: name
|
||||
permissions:
|
||||
-
|
||||
plugin: static_map
|
||||
source: permissions
|
||||
bypass: true
|
||||
map:
|
||||
'use PHP for block visibility': 'use PHP for settings'
|
||||
'administer site-wide contact form': 'administer contact forms'
|
||||
'post comments without approval': 'skip comment approval'
|
||||
'edit own blog entries' : 'edit own blog content'
|
||||
'edit any blog entry' : 'edit any blog content'
|
||||
'delete own blog entries' : 'delete own blog content'
|
||||
'delete any blog entry' : 'delete any blog content'
|
||||
'create forum topics' : 'create forum content'
|
||||
'delete any forum topic' : 'delete any forum content'
|
||||
'delete own forum topics' : 'delete own forum content'
|
||||
'edit any forum topic' : 'edit any forum content'
|
||||
'edit own forum topics' : 'edit own forum content'
|
||||
- plugin: system_update_7000
|
||||
- plugin: node_update_7008
|
||||
- plugin: flatten
|
||||
- plugin: filter_format_permission
|
||||
destination:
|
||||
plugin: entity:user_role
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_filter_format
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_filter_format
|
||||
module:
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,32 @@
|
|||
id: d6_user_settings
|
||||
label: Drupal 6 user configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- user_mail_status_blocked_notify
|
||||
- user_mail_status_activated_notify
|
||||
- user_email_verification
|
||||
- user_register
|
||||
- anonymous
|
||||
process:
|
||||
'notify/status_blocked': user_mail_status_blocked_notify
|
||||
'notify/status_activated': user_mail_status_activated_notify
|
||||
verify_mail: user_email_verification
|
||||
register:
|
||||
plugin: static_map
|
||||
source: user_register
|
||||
default_value: visitors_admin_approval
|
||||
map:
|
||||
2: visitors_admin_approval
|
||||
1: user_register
|
||||
0: admin_only
|
||||
anonymous: anonymous
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: user.settings
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- user
|
|
@ -0,0 +1,44 @@
|
|||
id: d6_view_modes
|
||||
label: Drupal 6 view modes
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_view_mode
|
||||
constants:
|
||||
targetEntityType: node
|
||||
status: true
|
||||
|
||||
process:
|
||||
mode:
|
||||
plugin: static_map
|
||||
source: view_mode
|
||||
map:
|
||||
0: normal
|
||||
1: preview
|
||||
2: search_index
|
||||
3: search_result
|
||||
4: rss
|
||||
5: print
|
||||
teaser: teaser
|
||||
full: full
|
||||
label:
|
||||
plugin: static_map
|
||||
source: view_mode
|
||||
map:
|
||||
0: "Normal"
|
||||
1: "Preview"
|
||||
2: "Search index"
|
||||
3: "Search result"
|
||||
4: "RSS"
|
||||
5: "Print"
|
||||
teaser: "Teaser"
|
||||
full: "Full"
|
||||
targetEntityType: 'constants/targetEntityType'
|
||||
status: 'constants/status'
|
||||
|
||||
destination:
|
||||
plugin: entity:entity_view_mode
|
||||
dependencies:
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,34 @@
|
|||
id: d6_vocabulary_entity_display
|
||||
label: Drupal 6 vocabulary display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_taxonomy_vocabulary_per_type
|
||||
constants:
|
||||
entity_type: node
|
||||
view_mode: default
|
||||
options:
|
||||
label: hidden
|
||||
type: entity_reference_label
|
||||
weight: 20
|
||||
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
view_mode: 'constants/view_mode'
|
||||
options: 'constants/options'
|
||||
bundle: type
|
||||
field_name:
|
||||
plugin: migration
|
||||
migration: d6_taxonomy_vocabulary
|
||||
source: vid
|
||||
destination:
|
||||
plugin: component_entity_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_vocabulary_field_instance
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_vocabulary_field_instance
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,32 @@
|
|||
id: d6_vocabulary_entity_form_display
|
||||
label: Drupal 6 vocabulary form display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_taxonomy_vocabulary_per_type
|
||||
constants:
|
||||
entity_type: node
|
||||
form_mode: default
|
||||
options:
|
||||
type: options_select
|
||||
weight: 20
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
form_mode: 'constants/form_mode'
|
||||
options: 'constants/options'
|
||||
bundle: type
|
||||
field_name:
|
||||
plugin: migration
|
||||
migration: d6_taxonomy_vocabulary
|
||||
source: vid
|
||||
destination:
|
||||
plugin: component_entity_form_display
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_vocabulary_field_instance
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_vocabulary_field_instance
|
||||
module:
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,33 @@
|
|||
id: d6_vocabulary_field
|
||||
label: Drupal 6 vocabulary field configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_taxonomy_vocabulary
|
||||
constants:
|
||||
entity_type: node
|
||||
type: entity_reference
|
||||
target_entity_type: taxonomy_term
|
||||
cardinality: -1
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
type: 'constants/type'
|
||||
field_name:
|
||||
plugin: migration
|
||||
migration: d6_taxonomy_vocabulary
|
||||
source: vid
|
||||
'settings/target_type': 'constants/target_entity_type'
|
||||
cardinality: 'constants/cardinality'
|
||||
destination:
|
||||
plugin: md_entity:field_storage_config
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_taxonomy_vocabulary
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_taxonomy_vocabulary
|
||||
module:
|
||||
- entity_reference
|
||||
- field
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,32 @@
|
|||
id: d6_vocabulary_field_instance
|
||||
label: Drupal 6 vocabulary field instance configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: d6_taxonomy_vocabulary_per_type
|
||||
constants:
|
||||
entity_type: node
|
||||
auto_create: true
|
||||
selection_handler: 'default:taxonomy_term'
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: type
|
||||
field_name:
|
||||
plugin: migration
|
||||
migration: d6_taxonomy_vocabulary
|
||||
source: vid
|
||||
'settings/handler': 'constants/selection_handler'
|
||||
'settings/handler_settings/target_bundles/0': @field_name
|
||||
'settings/handler_settings/auto_create': 'constants/auto_create'
|
||||
destination:
|
||||
plugin: entity:field_config
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_vocabulary_field
|
||||
dependencies:
|
||||
config:
|
||||
- migrate.migration.d6_vocabulary_field
|
||||
module:
|
||||
- field
|
||||
- migrate_drupal
|
||||
- node
|
|
@ -0,0 +1,378 @@
|
|||
# Schema for the migrate_drupal source plugins.
|
||||
|
||||
migrate.source.variable:
|
||||
type: migrate_source_sql
|
||||
label: 'Variable'
|
||||
mapping:
|
||||
variables:
|
||||
type: sequence
|
||||
label: 'Variables'
|
||||
sequence:
|
||||
type: string
|
||||
label: 'Variable'
|
||||
constants:
|
||||
type: mapping
|
||||
label: 'Constants'
|
||||
mapping:
|
||||
entity_type:
|
||||
type: string
|
||||
label: 'Entity type'
|
||||
id:
|
||||
type: string
|
||||
label: 'ID'
|
||||
label:
|
||||
type: label
|
||||
label: 'Label'
|
||||
description:
|
||||
type: text
|
||||
label: 'Description'
|
||||
path:
|
||||
type: string
|
||||
label: 'Path'
|
||||
plugin:
|
||||
type: string
|
||||
label: 'Plugin'
|
||||
status:
|
||||
type: boolean
|
||||
label: 'Status'
|
||||
slash:
|
||||
type: string
|
||||
label: 'Slash'
|
||||
|
||||
migrate.source.d6_comment:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 comment'
|
||||
mapping:
|
||||
constants:
|
||||
type: mapping
|
||||
label: 'Constants'
|
||||
mapping:
|
||||
entity_type:
|
||||
type: string
|
||||
label: 'Entity type'
|
||||
|
||||
migrate.source.d6_comment_variable_per_comment_type:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 comment variable'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_comment_entity_form_display_subject:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 comment subject entity form display'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_menu_link:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 menu link'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_box:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 box'
|
||||
mapping:
|
||||
constants:
|
||||
type: mapping
|
||||
label: 'Constants'
|
||||
mapping:
|
||||
type:
|
||||
type: string
|
||||
label: 'Type'
|
||||
|
||||
migrate.source.d6_taxonomy_vocabulary:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 field instance form display'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_field_instance_per_form_display:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 field instance form display'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_taxonomy_vocabulary_per_type:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 field instance form display'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_taxonomy_vocabulary_per_type:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 field instance form display'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_field:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 field'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.variable_multirow:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal variable multirow'
|
||||
mapping:
|
||||
variables:
|
||||
type: sequence
|
||||
label: 'Variables'
|
||||
sequence:
|
||||
type: string
|
||||
label: 'Variable'
|
||||
|
||||
migrate.source.d6_comment_variable:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 comment variable'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_contact_settings:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 contact settings'
|
||||
mapping:
|
||||
variables:
|
||||
type: sequence
|
||||
label: 'Variables'
|
||||
sequence:
|
||||
type: string
|
||||
label: 'Variable'
|
||||
|
||||
migrate.source.d6_view_mode:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 view mode'
|
||||
mapping:
|
||||
constants:
|
||||
type: mapping
|
||||
label: 'Constants'
|
||||
mapping:
|
||||
targetEntityType:
|
||||
type: string
|
||||
label: 'Target entity type'
|
||||
status:
|
||||
type: boolean
|
||||
label: 'Status'
|
||||
|
||||
migrate.source.d6_profile_field:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 profile field'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_field_formatter_settings:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 field formatter settings'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_node_type:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 node type'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_node:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 node'
|
||||
mapping:
|
||||
node_type:
|
||||
# The node type can be specified both as a string ID of a node type or an
|
||||
# array of node type IDs, so there is no way to consistently parse this.
|
||||
type: ignore
|
||||
label: 'Node type'
|
||||
|
||||
migrate.source.d6_node_revision:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 node'
|
||||
mapping:
|
||||
node_type:
|
||||
# The node type can be specified both as a string ID of a node type or an
|
||||
# array of node type IDs, so there is no way to consistently parse this.
|
||||
type: ignore
|
||||
label: 'Node type'
|
||||
|
||||
migrate.source.d6_upload_instance:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 upload form display'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_field_instance:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 field instance'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_field_instance_per_view_mode:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 field formatter'
|
||||
mapping:
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate.source.d6_user:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 user'
|
||||
mapping:
|
||||
constants:
|
||||
type: mapping
|
||||
label: 'Constants'
|
||||
mapping:
|
||||
key:
|
||||
type: string
|
||||
label: 'User data key'
|
||||
module:
|
||||
type: string
|
||||
label: 'Module name'
|
||||
|
||||
migrate.source.d6_user_picture_file:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 user picure display'
|
||||
mapping:
|
||||
constants:
|
||||
type: mapping
|
||||
label: 'Constant'
|
||||
mapping:
|
||||
is_public:
|
||||
type: boolean
|
||||
label: 'Public'
|
||||
|
||||
migrate.source.d6_user_picture_instance:
|
||||
type: migrate_source_sql
|
||||
label: 'Drupal 6 user picure display'
|
||||
mapping:
|
||||
provider:
|
||||
type: string
|
||||
label: 'Provider'
|
||||
constants:
|
||||
type: migrate_entity_constant
|
||||
label: 'Constants'
|
||||
|
||||
migrate_entity_constant:
|
||||
type: mapping
|
||||
mapping:
|
||||
entity_type:
|
||||
type: string
|
||||
label: 'Entity type'
|
||||
bundle:
|
||||
type: string
|
||||
label: 'Bundle'
|
||||
label:
|
||||
type: label
|
||||
label: 'Label'
|
||||
id:
|
||||
type: string
|
||||
label: 'ID'
|
||||
target_entity_type:
|
||||
type: string
|
||||
label: 'Target entity type'
|
||||
view_mode:
|
||||
type: string
|
||||
label: 'View mode'
|
||||
form_mode:
|
||||
type: string
|
||||
label: 'Form mode'
|
||||
field_name:
|
||||
type: string
|
||||
label: 'Field name'
|
||||
empty:
|
||||
type: sequence
|
||||
label: 'Empty'
|
||||
sequence:
|
||||
type: string
|
||||
label: 'Empty'
|
||||
name:
|
||||
type: string
|
||||
label: 'Name'
|
||||
preview:
|
||||
type: integer
|
||||
label: 'Preview'
|
||||
create_body:
|
||||
type: boolean
|
||||
label: 'create body'
|
||||
required:
|
||||
type: boolean
|
||||
label: 'Required'
|
||||
type:
|
||||
type: string
|
||||
label: 'Type'
|
||||
cardinality:
|
||||
type: integer
|
||||
label: 'Cardinality'
|
||||
parent:
|
||||
type: integer
|
||||
label: 'Parent'
|
||||
langcode:
|
||||
type: string
|
||||
label: 'Language code'
|
||||
third_party_settings:
|
||||
type: sequence
|
||||
label: 'Settings'
|
||||
sequence:
|
||||
type: ignore
|
||||
label: 'Settings'
|
||||
settings:
|
||||
type: sequence
|
||||
label: 'Settings'
|
||||
sequence:
|
||||
type: ignore
|
||||
label: 'Settings'
|
||||
options:
|
||||
type: mapping
|
||||
label: 'Options'
|
||||
mapping:
|
||||
label:
|
||||
type: string
|
||||
label: 'label'
|
||||
type:
|
||||
type: string
|
||||
label: 'Type'
|
||||
weight:
|
||||
type: integer
|
||||
label: 'Weight'
|
||||
settings:
|
||||
type: sequence
|
||||
label: 'Settings'
|
||||
sequence:
|
||||
type: string
|
||||
label: 'Settings'
|
||||
selection_handler:
|
||||
type: string
|
||||
label: 'Entity reference selection handler'
|
||||
auto_create:
|
||||
type: boolean
|
||||
label: 'Entity reference selection setting: Auto-create new entities'
|
||||
|
||||
migrate.source.md_empty:
|
||||
type: migrate.source.empty
|
||||
label: 'Empty source for migrate_drupal migrations'
|
8
core/modules/migrate_drupal/migrate_drupal.info.yml
Normal file
8
core/modules/migrate_drupal/migrate_drupal.info.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
name: Migrate Drupal
|
||||
type: module
|
||||
description: 'Contains migrations from older Drupal versions.'
|
||||
package: Core
|
||||
version: VERSION
|
||||
core: 8.x
|
||||
dependencies:
|
||||
- migrate
|
31
core/modules/migrate_drupal/migrate_drupal.module
Normal file
31
core/modules/migrate_drupal/migrate_drupal.module
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Provides migration from other Drupal sites.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
|
||||
/**
|
||||
* Implements hook_entity_type_alter().
|
||||
*/
|
||||
function migrate_drupal_entity_type_alter(array &$entity_types) {
|
||||
/** @var \Drupal\Core\Config\Entity\ConfigEntityType[] $entity_types */
|
||||
$entity_types['migration']
|
||||
->setClass('Drupal\migrate_drupal\Entity\Migration')
|
||||
->setHandlerClass('storage', 'Drupal\migrate_drupal\MigrationStorage');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function migrate_drupal_help($route_name, RouteMatchInterface $route_match) {
|
||||
switch ($route_name) {
|
||||
case 'help.page.migrate_drupal':
|
||||
$output = '';
|
||||
$output .= '<h3>' . t('About') . '</h3>';
|
||||
$output .= '<p>' . t('The Migrate Drupal module provides a framework based on the <a href="!migrate">Migrate module</a> to facilitate migration from a Drupal (6, 7, or 8) site to your website. It does not provide a user interface. For more information, see the <a href="!migrate_drupal">online documentation for the Migrate Drupal module</a>.', array('!migrate' => \Drupal::url('help.page', array('name' => 'migrate')), '!migrate_drupal' => 'https://www.drupal.org/documentation/modules/migrate_drupal')) . '</p>';
|
||||
return $output;
|
||||
}
|
||||
}
|
7
core/modules/migrate_drupal/migrate_drupal.services.yml
Normal file
7
core/modules/migrate_drupal/migrate_drupal.services.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
services:
|
||||
plugin.manager.migrate.load:
|
||||
class: Drupal\migrate_drupal\Plugin\MigratePluginManager
|
||||
arguments: [load, '@container.namespaces', '@cache.discovery', '@module_handler']
|
||||
plugin.manager.migrate.cckfield:
|
||||
class: Drupal\migrate_drupal\Plugin\MigratePluginManager
|
||||
arguments: [cckfield, '@container.namespaces', '@cache.discovery', '@module_handler']
|
38
core/modules/migrate_drupal/src/Entity/Migration.php
Normal file
38
core/modules/migrate_drupal/src/Entity/Migration.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Entity\Migration.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Entity;
|
||||
|
||||
use Drupal\migrate\Entity\Migration as BaseMigration;
|
||||
|
||||
class Migration extends BaseMigration implements MigrationInterface {
|
||||
|
||||
/**
|
||||
* The load plugin configuration, if any.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $load = array();
|
||||
|
||||
/**
|
||||
* The load plugin.
|
||||
*
|
||||
* @var \Drupal\migrate_drupal\Plugin\MigrateLoadInterface|false
|
||||
*/
|
||||
protected $loadPlugin = FALSE;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getLoadPlugin() {
|
||||
if ($this->load && !$this->loadPlugin) {
|
||||
$this->loadPlugin = \Drupal::service('plugin.manager.migrate.load')->createInstance($this->load['plugin'], $this->load, $this);
|
||||
}
|
||||
return $this->loadPlugin;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Entity\MigrationInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Entity;
|
||||
|
||||
use Drupal\migrate\Entity\MigrationInterface as BaseMigrationInterface;
|
||||
|
||||
interface MigrationInterface extends BaseMigrationInterface {
|
||||
|
||||
/**
|
||||
* Returns the initialized load plugin if there's one.
|
||||
*
|
||||
* @return \Drupal\migrate_drupal\Plugin\MigrateLoadInterface|false
|
||||
*/
|
||||
public function getLoadPlugin();
|
||||
|
||||
}
|
237
core/modules/migrate_drupal/src/MigrationStorage.php
Normal file
237
core/modules/migrate_drupal/src/MigrationStorage.php
Normal file
|
@ -0,0 +1,237 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\MigrationStorage.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Component\Uuid\UuidInterface;
|
||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
||||
use Drupal\Core\Entity\EntityInterface;
|
||||
use Drupal\Core\Entity\EntityStorageException;
|
||||
use Drupal\Core\Entity\EntityTypeInterface;
|
||||
use Drupal\Core\Language\LanguageManagerInterface;
|
||||
use Drupal\migrate\Plugin\migrate\source\SourcePluginBase;
|
||||
use Drupal\migrate_drupal\Plugin\CckFieldMigrateSourceInterface;
|
||||
use Drupal\migrate\MigrationStorage as BaseMigrationStorage;
|
||||
use Drupal\migrate_drupal\Plugin\MigratePluginManager;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
/**
|
||||
* Storage for migration entities.
|
||||
*/
|
||||
class MigrationStorage extends BaseMigrationStorage {
|
||||
|
||||
/**
|
||||
* A cached array of cck field plugins.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $cckFieldPlugins;
|
||||
|
||||
/**
|
||||
* @var \Drupal\migrate_drupal\Plugin\MigratePluginManager
|
||||
*/
|
||||
protected $cckPluginManager;
|
||||
|
||||
/**
|
||||
* Constructs a MigrationStorage object.
|
||||
*
|
||||
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
|
||||
* The entity type definition.
|
||||
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
|
||||
* The config factory service.
|
||||
* @param \Drupal\Component\Uuid\UuidInterface $uuid_service
|
||||
* The UUID service.
|
||||
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
|
||||
* The language manager.
|
||||
* @param \Drupal\migrate_drupal\Plugin\MigratePluginManager
|
||||
* The cckfield plugin manager.
|
||||
*/
|
||||
public function __construct(EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, UuidInterface $uuid_service, LanguageManagerInterface $language_manager, MigratePluginManager $cck_plugin_manager) {
|
||||
parent::__construct($entity_type, $config_factory, $uuid_service, $language_manager);
|
||||
$this->cckPluginManager = $cck_plugin_manager;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
|
||||
return new static(
|
||||
$entity_type,
|
||||
$container->get('config.factory'),
|
||||
$container->get('uuid'),
|
||||
$container->get('language_manager'),
|
||||
$container->get('plugin.manager.migrate.cckfield')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function loadMultiple(array $ids = NULL) {
|
||||
$ids_to_load = array();
|
||||
$dynamic_ids = array();
|
||||
if (isset($ids)) {
|
||||
foreach ($ids as $id) {
|
||||
// Evaluate whether or not this migration is dynamic in the form of
|
||||
// migration_id:* to load all the additional migrations.
|
||||
if (($n = strpos($id, ':')) !== FALSE) {
|
||||
$base_id = substr($id, 0, $n);
|
||||
$ids_to_load[] = $base_id;
|
||||
// Get the ids of the additional migrations.
|
||||
$sub_id = substr($id, $n + 1);
|
||||
if ($sub_id == '*') {
|
||||
// If the id of the additional migration is '*', get all of them.
|
||||
$dynamic_ids[$base_id] = NULL;
|
||||
}
|
||||
elseif (!isset($dynamic_ids[$base_id]) || is_array($dynamic_ids[$base_id])) {
|
||||
$dynamic_ids[$base_id][] = $sub_id;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$ids_to_load[] = $id;
|
||||
}
|
||||
}
|
||||
$ids = array_flip($ids);
|
||||
}
|
||||
else {
|
||||
$ids_to_load = NULL;
|
||||
}
|
||||
|
||||
/** @var \Drupal\migrate_drupal\Entity\MigrationInterface[] $entities */
|
||||
$entities = parent::loadMultiple($ids_to_load);
|
||||
if (!isset($ids)) {
|
||||
// Changing the array being foreach()'d is not a good idea.
|
||||
$return = array();
|
||||
foreach ($entities as $entity_id => $entity) {
|
||||
if ($plugin = $entity->getLoadPlugin()) {
|
||||
$new_entities = $plugin->loadMultiple($this);
|
||||
$this->postLoad($new_entities);
|
||||
$this->getDynamicIds($dynamic_ids, $new_entities);
|
||||
$return += $new_entities;
|
||||
}
|
||||
else {
|
||||
$return[$entity_id] = $entity;
|
||||
}
|
||||
}
|
||||
$entities = $return;
|
||||
}
|
||||
else {
|
||||
foreach ($dynamic_ids as $base_id => $sub_ids) {
|
||||
$entity = $entities[$base_id];
|
||||
if ($plugin = $entity->getLoadPlugin()) {
|
||||
unset($entities[$base_id]);
|
||||
$new_entities = $plugin->loadMultiple($this, $sub_ids);
|
||||
$this->postLoad($new_entities);
|
||||
if (!isset($sub_ids)) {
|
||||
unset($dynamic_ids[$base_id]);
|
||||
$this->getDynamicIds($dynamic_ids, $new_entities);
|
||||
}
|
||||
$entities += $new_entities;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Allow modules providing cck field plugins to alter the required
|
||||
// migrations to assist with the migration a custom field type.
|
||||
$this->applyCckFieldProcessors($entities);
|
||||
|
||||
// Build an array of dependencies and set the order of the migrations.
|
||||
return $this->buildDependencyMigration($entities, $dynamic_ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract the dynamic id mapping from entities loaded by plugin.
|
||||
*
|
||||
* @param array $dynamic_ids
|
||||
* Get the dynamic migration ids.
|
||||
* @param array $entities
|
||||
* An array of entities.
|
||||
*/
|
||||
protected function getDynamicIds(array &$dynamic_ids, array $entities) {
|
||||
foreach (array_keys($entities) as $new_id) {
|
||||
list($base_id, $sub_id) = explode(':', $new_id, 2);
|
||||
$dynamic_ids[$base_id][] = $sub_id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function save(EntityInterface $entity) {
|
||||
if (strpos($entity->id(), ':') !== FALSE) {
|
||||
throw new EntityStorageException(SafeMarkup::format("Dynamic migration %id can't be saved", array('$%id' => $entity->id())));
|
||||
}
|
||||
return parent::save($entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow any field type plugins to adjust the migrations as required.
|
||||
*
|
||||
* @param \Drupal\migrate\Entity\Migration[] $entities
|
||||
* An array of migration entities.
|
||||
*/
|
||||
protected function applyCckFieldProcessors(array $entities) {
|
||||
$method_map = $this->getMigrationPluginMethodMap();
|
||||
|
||||
foreach ($entities as $entity_id => $migration) {
|
||||
// Allow field plugins to process the required migrations.
|
||||
if (isset($method_map[$entity_id])) {
|
||||
$method = $method_map[$entity_id];
|
||||
$cck_plugins = $this->getCckFieldPlugins();
|
||||
|
||||
array_walk($cck_plugins, function ($plugin) use ($method, $migration) {
|
||||
$plugin->$method($migration);
|
||||
});
|
||||
}
|
||||
|
||||
// If this is a CCK bundle migration, allow the cck field plugins to add
|
||||
// any field type processing.
|
||||
$source_plugin = $migration->getSourcePlugin();
|
||||
if ($source_plugin instanceof CckFieldMigrateSourceInterface && strpos($entity_id, SourcePluginBase::DERIVATIVE_SEPARATOR)) {
|
||||
$plugins = $this->getCckFieldPlugins();
|
||||
foreach ($source_plugin->fieldData() as $field_name => $data) {
|
||||
if (isset($plugins[$data['type']])) {
|
||||
$plugins[$data['type']]->processCckFieldValues($migration, $field_name, $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array of loaded cck field plugins.
|
||||
*
|
||||
* @return \Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface[]
|
||||
* An array of cck field process plugins.
|
||||
*/
|
||||
protected function getCckFieldPlugins() {
|
||||
if (!isset($this->cckFieldPlugins)) {
|
||||
$this->cckFieldPlugins = [];
|
||||
foreach ($this->cckPluginManager->getDefinitions() as $definition) {
|
||||
$this->cckFieldPlugins[$definition['id']] = $this->cckPluginManager->createInstance($definition['id']);
|
||||
}
|
||||
}
|
||||
return $this->cckFieldPlugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a map between migration ids and the cck field plugin method.
|
||||
*
|
||||
* @return array
|
||||
* The map between migrations and cck field plugin processing methods.
|
||||
*/
|
||||
protected function getMigrationPluginMethodMap() {
|
||||
return [
|
||||
'd6_field' => 'processField',
|
||||
'd6_field_instance' => 'processFieldInstance',
|
||||
'd6_field_instance_widget_settings' => 'processFieldWidget',
|
||||
'd6_field_formatter_settings' => 'processFieldFormatter',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Plugin\CckFieldMigrateSourceInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Plugin;
|
||||
|
||||
use Drupal\migrate\Plugin\MigrateSourceInterface;
|
||||
|
||||
/**
|
||||
* Defines an interface for cck field sources that need per type processing.
|
||||
*/
|
||||
interface CckFieldMigrateSourceInterface extends MigrateSourceInterface {
|
||||
|
||||
/**
|
||||
* Field data used for determining the field type in the LoadEntity
|
||||
*
|
||||
* @return mixed
|
||||
* An array of cck field data.
|
||||
*/
|
||||
public function fieldData();
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Plugin;
|
||||
|
||||
use Drupal\Component\Plugin\PluginInspectionInterface;
|
||||
use Drupal\migrate\Entity\MigrationInterface;
|
||||
|
||||
/**
|
||||
* Provides an interface for all CCK field type plugins.
|
||||
*/
|
||||
interface MigrateCckFieldInterface extends PluginInspectionInterface {
|
||||
|
||||
/**
|
||||
* Apply any custom processing to the field migration.
|
||||
*
|
||||
* @param \Drupal\migrate\Entity\MigrationInterface $migration
|
||||
* The migration entity.
|
||||
*/
|
||||
public function processField(MigrationInterface $migration);
|
||||
|
||||
/**
|
||||
* Apply any custom processing to the field instance migration.
|
||||
*
|
||||
* @param \Drupal\migrate\Entity\MigrationInterface $migration
|
||||
* The migration entity.
|
||||
*/
|
||||
public function processFieldInstance(MigrationInterface $migration);
|
||||
|
||||
/**
|
||||
* Apply any custom processing to the field widget migration.
|
||||
*
|
||||
* @param \Drupal\migrate\Entity\MigrationInterface $migration
|
||||
* The migration entity.
|
||||
*/
|
||||
public function processFieldWidget(MigrationInterface $migration);
|
||||
|
||||
/**
|
||||
* Apply any custom processing to the field formatter migration.
|
||||
*
|
||||
* @param \Drupal\migrate\Entity\MigrationInterface $migration
|
||||
* The migration entity.
|
||||
*/
|
||||
public function processFieldFormatter(MigrationInterface $migration);
|
||||
|
||||
/**
|
||||
* Get a map between D6 formatters and D8 formatters for this field type.
|
||||
*
|
||||
* This is used by static::processFieldFormatter() in the base class.
|
||||
*
|
||||
* @return array
|
||||
* The keys are D6 formatters and the values are D8 formatters.
|
||||
*/
|
||||
public function getFieldFormatterMap();
|
||||
|
||||
/**
|
||||
* Get a map between D6 and D8 widgets for this field type.
|
||||
*
|
||||
* @return array
|
||||
* The keys are D6 field widget types and the values D8 widgets.
|
||||
*/
|
||||
public function getFieldWidgetMap();
|
||||
|
||||
/**
|
||||
* Apply any custom processing to the cck bundle migrations.
|
||||
*
|
||||
* @param \Drupal\migrate\Entity\MigrationInterface $migration
|
||||
* The migration entity.
|
||||
* @param string $field_name
|
||||
* The field name we're processing the value for.
|
||||
* @param array $data
|
||||
* The array of field data from CckFieldValues::fieldData().
|
||||
*/
|
||||
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data);
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Plugin\MigrateLoadInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Plugin;
|
||||
|
||||
use Drupal\Component\Plugin\PluginInspectionInterface;
|
||||
use Drupal\Core\Entity\EntityStorageInterface;
|
||||
|
||||
/**
|
||||
* Defines an interface for migration load plugins.
|
||||
*
|
||||
* @see \Drupal\migrate_drupal\Plugin\migrate\load\LoadEntity
|
||||
*
|
||||
* @ingroup migration
|
||||
*/
|
||||
interface MigrateLoadInterface extends PluginInspectionInterface {
|
||||
|
||||
/**
|
||||
* Load an additional migration.
|
||||
*
|
||||
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
|
||||
* The migration storage.
|
||||
* @param string $sub_id
|
||||
* For example, when loading d6_node:article, this will be article.
|
||||
* @return \Drupal\migrate\Entity\MigrationInterface
|
||||
*/
|
||||
public function load(EntityStorageInterface $storage, $sub_id);
|
||||
|
||||
/**
|
||||
* Load additional migrations.
|
||||
*
|
||||
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
|
||||
* The migration storage.
|
||||
* @param array $sub_ids
|
||||
* For example, when loading d6_node:article, sub_id will be article.
|
||||
* If NULL then load all sub-migrations.
|
||||
* @return \Drupal\migrate\Entity\MigrationInterface[]
|
||||
*/
|
||||
public function loadMultiple(EntityStorageInterface $storage, array $sub_ids = NULL);
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue