Rename "Material" taxonomy to "Material types".
This also changes the `material` term reference field on Input logs to `material_type`, and updates all migrations accordingly.
This commit is contained in:
parent
ede1ed7605
commit
b88877b617
|
@ -324,7 +324,7 @@ vocabularies of terms. The vocabulary machine names have changed, to drop the
|
|||
- `farm_animal_types` -> `animal_type`
|
||||
- `farm_areas` has been removed (see "Areas" below)
|
||||
- `farm_log_categories` -> `log_category`
|
||||
- `farm_materials` -> `material`
|
||||
- `farm_materials` -> `material_type`
|
||||
- `farm_season` -> `season`
|
||||
- `farm_crops` -> `plant_type`
|
||||
- `farm_crop_families` -> `crop_family`
|
||||
|
|
|
@ -269,7 +269,7 @@ Input Logs have the following additional attributes:
|
|||
|
||||
And the following additional relationships:
|
||||
|
||||
- Material (References Terms in the "Material" vocabulary)
|
||||
- Material type (References Terms in the "Material types" vocabulary)
|
||||
|
||||
#### Lab Test Logs
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ is enabled. The modules included with farmOS define the following vocabularies:
|
|||
|
||||
- Animal type
|
||||
- Log category
|
||||
- Material
|
||||
- Material type
|
||||
- Plant type
|
||||
- Season
|
||||
- Unit
|
||||
|
|
|
@ -32,13 +32,13 @@ process:
|
|||
lot_number:
|
||||
plugin: get
|
||||
source: field_farm_lot_number
|
||||
material:
|
||||
material_type:
|
||||
plugin: sub_process
|
||||
source: field_farm_material
|
||||
process:
|
||||
target_id:
|
||||
plugin: migration_lookup
|
||||
migration: farm_migrate_taxonomy_material
|
||||
migration: farm_migrate_taxonomy_material_type
|
||||
source: tid
|
||||
method:
|
||||
plugin: get
|
||||
|
@ -51,5 +51,5 @@ process:
|
|||
source: field_farm_input_source
|
||||
migration_dependencies:
|
||||
required:
|
||||
- farm_migrate_taxonomy_material
|
||||
- farm_migrate_taxonomy_material_type
|
||||
optional: { }
|
||||
|
|
|
@ -3,10 +3,10 @@ status: true
|
|||
dependencies:
|
||||
enforced:
|
||||
module:
|
||||
- farm_material
|
||||
- farm_material_type
|
||||
- farm_migrate
|
||||
id: farm_migrate_taxonomy_material
|
||||
label: 'Taxonomy terms (Materials)'
|
||||
id: farm_migrate_taxonomy_material_type
|
||||
label: 'Taxonomy terms (Material types)'
|
||||
migration_group: farm_migrate_taxonomy
|
||||
migration_tags:
|
||||
- 'Drupal 7'
|
||||
|
@ -23,7 +23,7 @@ process:
|
|||
# Hard-code the vocabulary.
|
||||
vid:
|
||||
plugin: default_value
|
||||
default_value: material
|
||||
default_value: material_type
|
||||
# Maintain the term ID.
|
||||
tid:
|
||||
plugin: get
|
||||
|
@ -36,7 +36,7 @@ process:
|
|||
source: parent
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: farm_migrate_taxonomy_material
|
||||
migration: farm_migrate_taxonomy_material_type
|
||||
parent:
|
||||
plugin: default_value
|
||||
default_value: 0
|
|
@ -5,4 +5,4 @@ package: farmOS Logs
|
|||
core_version_requirement: ^9
|
||||
dependencies:
|
||||
- farm:farm_entity
|
||||
- farm:farm_material
|
||||
- farm:farm_material_type
|
||||
|
|
|
@ -32,13 +32,13 @@ class Input extends FarmLogType {
|
|||
];
|
||||
$fields['lot_number'] = $this->farmFieldFactory->bundleFieldDefinition($options);
|
||||
|
||||
// Material.
|
||||
// Material type.
|
||||
$options = [
|
||||
'type' => 'entity_reference',
|
||||
'label' => $this->t('Material'),
|
||||
'description' => $this->t('What materials are being applied?'),
|
||||
'label' => $this->t('Material type'),
|
||||
'description' => $this->t('What type of materials are being applied?'),
|
||||
'target_type' => 'taxonomy_term',
|
||||
'target_bundle' => 'material',
|
||||
'target_bundle' => 'material_type',
|
||||
'auto_create' => TRUE,
|
||||
'multiple' => TRUE,
|
||||
'weight' => [
|
||||
|
@ -46,7 +46,7 @@ class Input extends FarmLogType {
|
|||
'view' => -50,
|
||||
],
|
||||
];
|
||||
$fields['material'] = $this->farmFieldFactory->bundleFieldDefinition($options);
|
||||
$fields['material_type'] = $this->farmFieldFactory->bundleFieldDefinition($options);
|
||||
|
||||
// Method.
|
||||
$options = [
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
enforced:
|
||||
module:
|
||||
- farm_material
|
||||
name: Materials
|
||||
vid: material
|
||||
description: 'A list of materials.'
|
||||
weight: 0
|
|
@ -0,0 +1,10 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
enforced:
|
||||
module:
|
||||
- farm_material_type
|
||||
name: Material types
|
||||
vid: material_type
|
||||
description: 'A list of material types.'
|
||||
weight: 0
|
|
@ -1,5 +1,5 @@
|
|||
name: Materials vocabulary
|
||||
description: Provides a Materials vocabulary.
|
||||
name: Material types vocabulary
|
||||
description: Provides a Material types vocabulary.
|
||||
type: module
|
||||
package: farmOS Taxonomies
|
||||
core_version_requirement: ^9
|
Loading…
Reference in New Issue