
| Current Path : /var/www/html/rocksensor2/web/core/modules/field/migrations/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor2/web/core/modules/field/migrations/d7_field_formatter_settings.yml |
id: d7_field_formatter_settings
label: Field formatter configuration
migration_tags:
- Drupal 7
- Configuration
class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration
field_plugin_method: alterFieldFormatterMigration
source:
plugin: d7_field_instance_per_view_mode
constants:
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_lookup
migration: d7_field
source:
- field_name
- entity_type
-
plugin: extract
index:
- 0
-
plugin: skip_on_empty
method: row
entity_type: entity_type
# 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 for more information.
bundle:
-
plugin: migration_lookup
migration: d7_field_instance
source:
- entity_type
- bundle
- field_name
-
plugin: extract
index:
- 1
view_mode:
-
plugin: migration_lookup
migration: d7_view_modes
source:
- entity_type
- view_mode
-
plugin: extract
index:
- 1
-
plugin: static_map
bypass: true
map:
full: default
field_name: field_name
"options/label": 'formatter/label'
"options/weight": 'formatter/weight'
# The field plugin ID.
plugin_id:
plugin: process_field
source: type
method: getPluginId
# The formatter to use.
formatter_type:
plugin: process_field
source: type
method: getFieldFormatterType
"options/type":
-
plugin: static_map
bypass: true
source:
- '@plugin_id'
- '@formatter_type'
# The map is generated by the getFieldFormatterMap() method from the
# migrate field plugins.
map: []
-
plugin: d7_field_type_defaults
-
plugin: skip_on_empty
method: row
hidden:
plugin: static_map
source: "@options/type"
map:
hidden: true
default_value: false
"options/settings":
plugin: default_value
source: 'formatter/settings'
default_value: []
"options/third_party_settings": 'constants/third_party_settings'
destination:
plugin: component_entity_display
migration_dependencies:
required:
- d7_field_instance
- d7_view_modes