uuid: dea3ee35-65a1-4325-98e1-3cfcf677a1ed
langcode: en
status: true
dependencies: {  }
id: upgrade_d7_field_formatter_settings
class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration
field_plugin_method: alterFieldFormatterMigration
cck_plugin_method: null
migration_tags:
  - 'Drupal 7'
  - Configuration
migration_group: migrate_drupal_7
label: 'Field formatter configuration'
source:
  plugin: d7_field_instance_per_view_mode
  constants:
    third_party_settings: {  }
process:
  field_type_exists:
    -
      plugin: migration_lookup
      migration: upgrade_d7_field
      source:
        - field_name
        - entity_type
    -
      plugin: extract
      index:
        - 0
    -
      plugin: skip_on_empty
      method: row
  entity_type:
    0:
      plugin: get
      source: entity_type
    paragraphs:
      plugin: static_map
      map:
        field_collection_item: paragraph
        paragraphs_item: paragraph
      bypass: true
  bundle:
    0:
      plugin: migration_lookup
      migration: upgrade_d7_field_instance
      source:
        - entity_type
        - bundle
        - field_name
    1:
      plugin: extract
      index:
        - 1
    paragraphs:
      plugin: paragraphs_process_on_value
      source_value: entity_type
      expected_value: field_collection_item
      process:
        plugin: substr
        start: 6
  view_mode:
    -
      plugin: migration_lookup
      migration: upgrade_d7_view_modes
      source:
        - entity_type
        - view_mode
    -
      plugin: extract
      index:
        - 1
    -
      plugin: static_map
      bypass: true
      map:
        full: default
  field_name:
    -
      plugin: get
      source: field_name
  options/label:
    -
      plugin: get
      source: formatter/label
  options/weight:
    -
      plugin: get
      source: formatter/weight
  plugin_id:
    -
      plugin: process_field
      source: type
      method: getPluginId
  formatter_type:
    -
      plugin: process_field
      source: type
      method: getFieldFormatterType
  options/type:
    -
      plugin: static_map
      bypass: true
      source:
        - '@plugin_id'
        - '@formatter_type'
      map:
        taxonomy_term_reference:
          taxonomy_term_reference_link: entity_reference_label
          taxonomy_term_reference_plain: entity_reference_label
          taxonomy_term_reference_rss_category: entity_reference_label
          i18n_taxonomy_term_reference_link: entity_reference_label
          entityreference_entity_view: entity_reference_entity_view
        link_field:
          link_default: link
        file:
          default: file_default
          url_plain: file_url_plain
          path_plain: file_url_plain
          image_plain: image
          image_nodelink: image
          image_imagelink: image
        datetime:
          date_default: datetime_default
    -
      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:
    -
      plugin: get
      source: constants/third_party_settings
destination:
  plugin: component_entity_display
migration_dependencies:
  required:
    - upgrade_d7_field_instance
    - upgrade_d7_view_modes
  optional:
    - upgrade_d7_field
    - upgrade_d7_field_instance
    - upgrade_d7_view_modes
