id: d7_taxonomy_term_showroom
label: Taxonomy terms Showroom
migration_group: d7_materio
audit: true
migration_tags:
  - Drupal 7
  - Content
  - Materio
deriver: Drupal\taxonomy\Plugin\migrate\D7TaxonomyTermDeriver

source:
  plugin: d7_taxonomy_term_showroom
  bundle: showroom

destination:
  plugin: entity:taxonomy_term

process:
  # If you are using this file to build a custom migration consider removing
  # the tid field to allow incremental migrations.
  # tid: tid
  vid:
    plugin: default_value
    default_value: showroom
  name: name
  weight: weight
  parent:
    plugin: default_value
    default_value: 0
  changed: timestamp
  langcode:
    plugin: default_value
    default_value: 'und'
  field_migration:
    plugin: default_value
    default_value: 'migration_imported'
  field_workflow:
    plugin: default_value
    default_value: 'workflow_visible'

  # tode node showroom
  field_website:
    plugin: iterator
    source: field_website
    process:
      uri: url
      title: title
      options: attributes
  field_memo: field_memo
  field_public_phone: public_phone
  field_public_email:
    plugin: iterator
    source: field_public_email
    process:
      value: email

  # field_address:
  #   plugin: addressfield
  #   source: field_address
  field_public_address:
    plugin: iterator
    source: field_public_address
    process:
      # langcode:
      country_code: country
      administrative_area: administrative_area
      locality: locality
      dependent_locality: dependent_locality
      postal_code: postal_code
      # sorting_code:
      address_line1: thoroughfare
      # address_line2:
      organization: organisation_name
      given_name: first_name
      # additional_name:
      family_name: last_name

      # SOURCES
      # sub_administrative_area
      # premise
      # sub_premise
      # name_line
      # data
  description:
    plugin: iterator
    source: body
    process:
      value: value
      format:
        plugin: default_value
        default_value: wysiwyg
