migrate.migration.d6_field_formatter_settings.yml 6.45 KB
Newer Older
1 2
id: d6_field_formatter_settings
label: Drupal 6 field formatter configuration
3 4
migration_groups:
  - Drupal 6
5 6 7 8
source:
  plugin: d6_field_instance_per_view_mode
  constants:
    entity_type: node
9
    third_party_settings: { }
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

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_row_on_empty
26
  entity_type: 'constants/entity_type'
27 28 29 30 31 32 33 34 35 36 37
  bundle: type_name
  view_mode:
    -
      plugin: migration
      migration: d6_view_modes
      source:
        - view_mode
    -
      plugin: extract
      index:
        - 1
38 39 40 41 42
    -
      plugin: static_map
      bypass: true
      map:
        full: default
43
  field_name: field_name
44 45 46
  "options/label": label
  "options/weight": weight
  "options/type":
47 48 49 50 51
      -
        plugin: static_map
        bypass: true
        source:
          - type
52
          - 'display_settings/format'
53 54 55 56
        map:
          text:
            default: text_default
            trimmed: text_trimmed
57
            plain: basic_string
58 59
          number_integer:
            default: number_integer
60 61 62
            us_0: number_integer
            be_0: number_integer
            fr_0: number_integer
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
            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
92
            plain: basic_string
93 94 95
          filefield:
            default: file_default
            url_plain: file_url_plain
96
            path_plain: file_url_plain
97 98 99 100
            image_plain: image
            image_nodelink: image
            image_imagelink: image
          fr_phone:
101
            default: basic_string
102
          be_phone:
103
            default: basic_string
104
          it_phone:
105
            default: basic_string
106
          el_phone:
107
            default: basic_string
108
          ch_phone:
109
            default: basic_string
110
          ca_phone:
111
            default: basic_string
112
          cr_phone:
113
            default: basic_string
114
          pa_phone:
115
            default: basic_string
116
          gb_phone:
117
            default: basic_string
118
          ru_phone:
119
            default: basic_string
120
          ua_phone:
121
            default: basic_string
122
          es_phone:
123
            default: basic_string
124
          au_phone:
125
            default: basic_string
126
          cs_phone:
127
            default: basic_string
128
          hu_phone:
129
            default: basic_string
130
          pl_phone:
131
            default: basic_string
132
          nl_phone:
133
            default: basic_string
134
          se_phone:
135
            default: basic_string
136
          za_phone:
137
            default: basic_string
138
          il_phone:
139
            default: basic_string
140
          nz_phone:
141
            default: basic_string
142
          br_phone:
143
            default: basic_string
144
          cl_phone:
145
            default: basic_string
146
          cn_phone:
147
            default: basic_string
148
          hk_phone:
149
            default: basic_string
150
          mo_phone:
151
            default: basic_string
152
          ph_phone:
153
            default: basic_string
154
          sg_phone:
155
            default: basic_string
156
          jo_phone:
157
            default: basic_string
158
          eg_phone:
159
            default: basic_string
160
          pk_phone:
161
            default: basic_string
162
          int_phone:
163
            default: basic_string
164 165
      -
        plugin: field_type_defaults
166
  "options/settings":
167 168 169 170 171
    -
      plugin: static_map
      bypass: true
      source:
        - module
172
        - 'display_settings/format'
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
      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
          format_interval:
            format_type: fallback
          long:
            format_type: long
          medium:
            format_type: medium
          short:
            format_type: short
        text:
          trimmed:
            trim_length: 600
245 246 247
        string:
          default:
            link_to_entity: false
248 249
    -
      plugin: field_formatter_settings_defaults
250
  "options/third_party_settings": 'constants/third_party_settings'
251 252 253 254

destination:
  plugin: component_entity_display
migration_dependencies:
255 256 257
  required:
    - d6_field_instance
    - d6_view_modes