label: Field formatter configuration
migration_tags:
- Drupal 7
-class: Drupal\migrate_drupal\Plugin\migrate\CckMigration
-cck_plugin_method: processFieldFormatter
+class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration
+field_plugin_method: processFieldFormatter
source:
plugin: d7_field_instance_per_view_mode
constants:
plugin: skip_on_empty
method: row
entity_type: entity_type
- bundle: bundle
+ # The bundle needs to be statically mapped in order to support comment types
+ # that might already exist before this migration is run. See
+ # d7_comment_type.yml or more information.
+ bundle:
+ plugin: static_map
+ source: bundle
+ bypass: true
+ map:
+ comment_node_forum: comment_forum
view_mode:
-
plugin: migration_lookup
map:
full: default
field_name: field_name
- "options/label": label
- "options/weight": weight
+ "options/label": 'formatter/label'
+ "options/weight": 'formatter/weight'
# The formatter to use.
+ formatter_type:
+ plugin: process_field
+ source: type
+ method: getFieldFormatterType
"options/type":
-
plugin: static_map
bypass: true
- source: formatter_type
+ source: '@formatter_type'
map:
date_default: datetime_default
email_default: email_mailto
method: row
"options/settings":
plugin: default_value
- source: settings
+ source: 'formatter/settings'
default_value: []
"options/third_party_settings": 'constants/third_party_settings'
destination: