86 lines
1.9 KiB
YAML
86 lines
1.9 KiB
YAML
langcode: en
|
|
status: true
|
|
dependencies:
|
|
enforced:
|
|
module:
|
|
- farm_migrate
|
|
- farm_plant
|
|
id: farm_migrate_taxonomy_plant_type
|
|
label: 'Taxonomy terms (Plant type)'
|
|
migration_group: farm_migrate_taxonomy
|
|
migration_tags:
|
|
- 'Drupal 7'
|
|
- 'farmOS 1.x'
|
|
class: Drupal\migrate\Plugin\Migration
|
|
field_plugin_method: null
|
|
cck_plugin_method: null
|
|
source:
|
|
plugin: d7_taxonomy_term
|
|
bundle: farm_crops
|
|
destination:
|
|
plugin: 'entity:taxonomy_term'
|
|
process:
|
|
# Hard-code the vocabulary.
|
|
vid:
|
|
plugin: default_value
|
|
default_value: plant_type
|
|
# Maintain the term ID.
|
|
tid:
|
|
plugin: get
|
|
source: tid
|
|
# Term parent.
|
|
parent_id:
|
|
-
|
|
plugin: skip_on_empty
|
|
method: process
|
|
source: parent
|
|
-
|
|
plugin: migration_lookup
|
|
migration: farm_migrate_taxonomy_plant_type
|
|
parent:
|
|
plugin: default_value
|
|
default_value: 0
|
|
source: '@parent_id'
|
|
# Plant type specific fields.
|
|
companions:
|
|
plugin: sub_process
|
|
source: field_farm_companions
|
|
process:
|
|
target_id:
|
|
plugin: migration_lookup
|
|
migration: farm_migrate_taxonomy_plant_type
|
|
source: tid
|
|
crop_family:
|
|
plugin: sub_process
|
|
source: field_farm_crop_family
|
|
process:
|
|
target_id:
|
|
plugin: migration_lookup
|
|
migration: farm_migrate_taxonomy_crop_family
|
|
source: tid
|
|
transplant_days:
|
|
plugin: get
|
|
source: field_farm_transplant_days
|
|
maturity_days:
|
|
plugin: get
|
|
source: field_farm_maturity_days
|
|
image:
|
|
plugin: sub_process
|
|
source: field_farm_images
|
|
process:
|
|
target_id:
|
|
plugin: migration_lookup
|
|
migration:
|
|
- farm_migrate_file
|
|
- farm_migrate_file_private
|
|
no_stub: true
|
|
source: fid
|
|
alt: alt
|
|
title: title
|
|
width: width
|
|
height: height
|
|
migration_dependencies:
|
|
required:
|
|
- farm_migrate_taxonomy_crop_family
|
|
optional: { }
|