Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
18
web/core/modules/user/migrations/d6_profile_values.yml
Normal file
18
web/core/modules/user/migrations/d6_profile_values.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
id: d6_profile_values
|
||||
label: Profile values
|
||||
class: Drupal\user\Plugin\migrate\ProfileValues
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Content
|
||||
source:
|
||||
plugin: d6_profile_field_values
|
||||
process:
|
||||
uid: uid
|
||||
destination:
|
||||
plugin: entity:user
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user
|
||||
- user_profile_field_instance
|
||||
- user_profile_entity_display
|
||||
- user_profile_entity_form_display
|
56
web/core/modules/user/migrations/d6_user.yml
Normal file
56
web/core/modules/user/migrations/d6_user.yml
Normal file
|
@ -0,0 +1,56 @@
|
|||
id: d6_user
|
||||
label: User accounts
|
||||
audit: true
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Content
|
||||
source:
|
||||
plugin: d6_user
|
||||
process:
|
||||
# If you are using this file to build a custom migration consider removing
|
||||
# the uid field to allow incremental migrations.
|
||||
uid: uid
|
||||
name: name
|
||||
pass: pass
|
||||
mail: mail
|
||||
created: created
|
||||
access: access
|
||||
login: login
|
||||
status: status
|
||||
timezone:
|
||||
plugin: user_update_7002
|
||||
source: timezone
|
||||
langcode:
|
||||
plugin: user_langcode
|
||||
source: language
|
||||
fallback_to_site_default: false
|
||||
preferred_langcode:
|
||||
plugin: user_langcode
|
||||
source: language
|
||||
fallback_to_site_default: true
|
||||
preferred_admin_langcode:
|
||||
plugin: user_langcode
|
||||
source: language
|
||||
fallback_to_site_default: true
|
||||
init: init
|
||||
roles:
|
||||
plugin: migration_lookup
|
||||
migration: d6_user_role
|
||||
source: roles
|
||||
user_picture:
|
||||
plugin: migration_lookup
|
||||
migration: d6_user_picture_file
|
||||
source: uid
|
||||
no_stub: true
|
||||
destination:
|
||||
plugin: entity:user
|
||||
md5_passwords: true
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user_role
|
||||
optional:
|
||||
- language
|
||||
- default_language
|
||||
- d6_user_picture_file
|
||||
- user_picture_entity_display
|
||||
- user_picture_entity_form_display
|
|
@ -0,0 +1,24 @@
|
|||
id: d6_user_contact_settings
|
||||
label: User contact settings
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Content
|
||||
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
|
69
web/core/modules/user/migrations/d6_user_mail.yml
Normal file
69
web/core/modules/user/migrations/d6_user_mail.yml
Normal file
|
@ -0,0 +1,69 @@
|
|||
id: d6_user_mail
|
||||
label: User mail configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Configuration
|
||||
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_register_pending_approval_subject
|
||||
- user_mail_register_pending_approval_body
|
||||
- user_mail_status_blocked_subject
|
||||
- user_mail_status_blocked_body
|
||||
source_module: user
|
||||
process:
|
||||
'status_activated/subject':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_status_activated_subject
|
||||
'status_activated/body':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_status_activated_body
|
||||
'password_reset/subject':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_password_reset_subject
|
||||
'password_reset/body':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_password_reset_body
|
||||
'cancel_confirm/subject':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_status_deleted_subject
|
||||
'cancel_confirm/body':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_status_deleted_body
|
||||
'register_admin_created/subject':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_register_admin_created_subject
|
||||
'register_admin_created/body':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_register_admin_created_body
|
||||
'register_no_approval_required/subject':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_register_no_approval_required_subject
|
||||
'register_no_approval_required/body':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_register_no_approval_required_body
|
||||
'register_pending_approval/subject':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_register_pending_approval_subject
|
||||
'register_pending_approval/body':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_register_pending_approval_body
|
||||
'status_blocked/subject':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_status_blocked_subject
|
||||
'status_blocked/body':
|
||||
plugin: convert_tokens
|
||||
source: user_mail_status_blocked_body
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: user.mail
|
44
web/core/modules/user/migrations/d6_user_picture_file.yml
Normal file
44
web/core/modules/user/migrations/d6_user_picture_file.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
id: d6_user_picture_file
|
||||
label: User pictures
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Content
|
||||
source:
|
||||
plugin: d6_user_picture_file
|
||||
constants:
|
||||
is_public: true
|
||||
# source_base_path must be set by the tool configuring this migration. It
|
||||
# represents the fully qualified path relative to which URIs in the files
|
||||
# table are specified, and must end with a /.
|
||||
source_base_path: ''
|
||||
process:
|
||||
filename: filename
|
||||
uid: uid
|
||||
source_full_path:
|
||||
-
|
||||
plugin: concat
|
||||
delimiter: /
|
||||
source:
|
||||
- constants/source_base_path
|
||||
- picture
|
||||
-
|
||||
plugin: urlencode
|
||||
destination_full_path:
|
||||
plugin: file_uri
|
||||
source:
|
||||
- picture
|
||||
- file_directory_path
|
||||
- temp_directory_path
|
||||
- 'constants/is_public'
|
||||
uri:
|
||||
plugin: file_copy
|
||||
source:
|
||||
- '@source_full_path'
|
||||
- '@destination_full_path'
|
||||
destination:
|
||||
plugin: entity:file
|
||||
migration_dependencies:
|
||||
# Every migration that references a file by Drupal 6 fid should specify d6_file as an
|
||||
# optional dependency.
|
||||
optional:
|
||||
- d6_file
|
42
web/core/modules/user/migrations/d6_user_role.yml
Normal file
42
web/core/modules/user/migrations/d6_user_role.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
id: d6_user_role
|
||||
label: User roles
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Configuration
|
||||
source:
|
||||
plugin: d6_user_role
|
||||
process:
|
||||
id:
|
||||
-
|
||||
plugin: machine_name
|
||||
source: name
|
||||
-
|
||||
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
|
30
web/core/modules/user/migrations/d6_user_settings.yml
Normal file
30
web/core/modules/user/migrations/d6_user_settings.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
id: d6_user_settings
|
||||
label: User configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Configuration
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- user_mail_status_blocked_notify
|
||||
- user_mail_status_activated_notify
|
||||
- user_email_verification
|
||||
- user_register
|
||||
- anonymous
|
||||
source_module: user
|
||||
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: visitors
|
||||
0: admin_only
|
||||
anonymous: anonymous
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: user.settings
|
59
web/core/modules/user/migrations/d7_user.yml
Normal file
59
web/core/modules/user/migrations/d7_user.yml
Normal file
|
@ -0,0 +1,59 @@
|
|||
id: d7_user
|
||||
label: User accounts
|
||||
audit: true
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Content
|
||||
class: Drupal\user\Plugin\migrate\User
|
||||
source:
|
||||
plugin: d7_user
|
||||
process:
|
||||
# If you are using this file to build a custom migration consider removing
|
||||
# the uid field to allow incremental migrations.
|
||||
uid: uid
|
||||
name: name
|
||||
pass: pass
|
||||
mail: mail
|
||||
created: created
|
||||
access: access
|
||||
login: login
|
||||
status: status
|
||||
timezone: timezone
|
||||
langcode:
|
||||
plugin: user_langcode
|
||||
source: entity_language
|
||||
fallback_to_site_default: false
|
||||
preferred_langcode:
|
||||
plugin: user_langcode
|
||||
source: language
|
||||
fallback_to_site_default: true
|
||||
preferred_admin_langcode:
|
||||
plugin: user_langcode
|
||||
source: language
|
||||
fallback_to_site_default: true
|
||||
init: init
|
||||
roles:
|
||||
plugin: migration_lookup
|
||||
migration: d7_user_role
|
||||
source: roles
|
||||
user_picture:
|
||||
-
|
||||
plugin: default_value
|
||||
source: picture
|
||||
default_value: null
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: d7_file
|
||||
destination:
|
||||
plugin: entity:user
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d7_user_role
|
||||
optional:
|
||||
- d7_field_instance
|
||||
- d7_file
|
||||
- language
|
||||
- default_language
|
||||
- user_picture_field_instance
|
||||
- user_picture_entity_display
|
||||
- user_picture_entity_form_display
|
23
web/core/modules/user/migrations/d7_user_flood.yml
Normal file
23
web/core/modules/user/migrations/d7_user_flood.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
id: d7_user_flood
|
||||
label: User flood configuration
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- user_failed_login_identifier_uid_only
|
||||
- user_failed_login_ip_limit
|
||||
- user_failed_login_ip_window
|
||||
- user_failed_login_user_window
|
||||
- user_failed_login_user_limit
|
||||
source_module: user
|
||||
process:
|
||||
uid_only: user_failed_login_identifier_uid_only
|
||||
ip_limit: user_failed_login_ip_limit
|
||||
ip_window: user_failed_login_ip_window
|
||||
user_limit: user_failed_login_user_limit
|
||||
user_window: user_failed_login_user_window
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: user.flood
|
41
web/core/modules/user/migrations/d7_user_mail.yml
Normal file
41
web/core/modules/user/migrations/d7_user_mail.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
id: d7_user_mail
|
||||
label: User mail configuration
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
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_canceled_subject
|
||||
- user_mail_status_canceled_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_register_pending_approval_subject
|
||||
- user_mail_register_pending_approval_body
|
||||
- user_mail_status_blocked_subject
|
||||
- user_mail_status_blocked_body
|
||||
source_module: user
|
||||
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_canceled_subject
|
||||
'cancel_confirm/body': user_mail_status_canceled_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_register_pending_approval_subject
|
||||
'register_pending_approval/body': 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
|
40
web/core/modules/user/migrations/d7_user_role.yml
Normal file
40
web/core/modules/user/migrations/d7_user_role.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
id: d7_user_role
|
||||
label: User roles
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
source:
|
||||
plugin: d7_user_role
|
||||
process:
|
||||
id:
|
||||
-
|
||||
plugin: machine_name
|
||||
source: name
|
||||
-
|
||||
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: flatten
|
||||
weight: weight
|
||||
destination:
|
||||
plugin: entity:user_role
|
||||
migration_dependencies:
|
||||
optional:
|
||||
- d7_filter_format
|
|
@ -0,0 +1,32 @@
|
|||
id: user_picture_entity_display
|
||||
label: User picture display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
source:
|
||||
plugin: 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:
|
||||
- user_picture_field_instance
|
|
@ -0,0 +1,31 @@
|
|||
id: user_picture_entity_form_display
|
||||
label: User picture form display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
source:
|
||||
plugin: 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:
|
||||
- user_picture_field_instance
|
26
web/core/modules/user/migrations/user_picture_field.yml
Normal file
26
web/core/modules/user/migrations/user_picture_field.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
id: user_picture_field
|
||||
label: User picture field configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
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
|
||||
source_module: user
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
field_name: 'constants/name'
|
||||
type: 'constants/type'
|
||||
cardinality: 'constants/cardinality'
|
||||
destination:
|
||||
plugin: entity:field_storage_config
|
||||
dependencies:
|
||||
module:
|
||||
- image
|
|
@ -0,0 +1,32 @@
|
|||
id: user_picture_field_instance
|
||||
label: User picture field instance configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
source:
|
||||
plugin: 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:
|
||||
- user_picture_field
|
|
@ -0,0 +1,56 @@
|
|||
id: user_profile_entity_display
|
||||
label: User profile display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
source:
|
||||
plugin: 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:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: user_profile_field
|
||||
source: fid
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
-
|
||||
plugin: extract
|
||||
index:
|
||||
- 1
|
||||
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
|
||||
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
|
||||
migration_dependencies:
|
||||
required:
|
||||
- user_profile_field_instance
|
|
@ -0,0 +1,65 @@
|
|||
id: user_profile_entity_form_display
|
||||
label: User profile form display configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
source:
|
||||
plugin: profile_field
|
||||
constants:
|
||||
empty: {}
|
||||
entity_type: user
|
||||
bundle: user
|
||||
form_mode: default
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: 'constants/bundle'
|
||||
field_name:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: user_profile_field
|
||||
source: fid
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
-
|
||||
plugin: extract
|
||||
index:
|
||||
- 1
|
||||
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
|
||||
migration_dependencies:
|
||||
required:
|
||||
- user_profile_field_instance
|
44
web/core/modules/user/migrations/user_profile_field.yml
Normal file
44
web/core/modules/user/migrations/user_profile_field.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
id: user_profile_field
|
||||
label: User profile field configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
source:
|
||||
plugin: profile_field
|
||||
constants:
|
||||
entity_type: user
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
field_name:
|
||||
-
|
||||
plugin: machine_name
|
||||
source: name
|
||||
-
|
||||
plugin: make_unique_entity_field
|
||||
length: 30
|
||||
entity_type: field_storage_config
|
||||
field: field_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: profile_field_settings
|
||||
source: type
|
||||
'settings/allowed_values': options
|
||||
cardinality:
|
||||
plugin: static_map
|
||||
default_value: 1
|
||||
source: type
|
||||
map:
|
||||
list: -1
|
||||
destination:
|
||||
plugin: entity:field_storage_config
|
|
@ -0,0 +1,34 @@
|
|||
id: user_profile_field_instance
|
||||
label: User profile field instance configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
source:
|
||||
plugin: profile_field
|
||||
constants:
|
||||
entity_type: user
|
||||
bundle: user
|
||||
process:
|
||||
entity_type: 'constants/entity_type'
|
||||
bundle: 'constants/bundle'
|
||||
label: title
|
||||
description: explanation
|
||||
field_name:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: user_profile_field
|
||||
source: fid
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
-
|
||||
plugin: extract
|
||||
index:
|
||||
- 1
|
||||
required: required
|
||||
destination:
|
||||
plugin: entity:field_config
|
||||
migration_dependencies:
|
||||
required:
|
||||
- user_profile_field
|
Reference in a new issue