mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
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_animal_types` -> `animal_type`
|
||||||
- `farm_areas` has been removed (see "Areas" below)
|
- `farm_areas` has been removed (see "Areas" below)
|
||||||
- `farm_log_categories` -> `log_category`
|
- `farm_log_categories` -> `log_category`
|
||||||
- `farm_materials` -> `material`
|
- `farm_materials` -> `material_type`
|
||||||
- `farm_season` -> `season`
|
- `farm_season` -> `season`
|
||||||
- `farm_crops` -> `plant_type`
|
- `farm_crops` -> `plant_type`
|
||||||
- `farm_crop_families` -> `crop_family`
|
- `farm_crop_families` -> `crop_family`
|
||||||
|
|
|
@ -269,7 +269,7 @@ Input Logs have the following additional attributes:
|
||||||
|
|
||||||
And the following additional relationships:
|
And the following additional relationships:
|
||||||
|
|
||||||
- Material (References Terms in the "Material" vocabulary)
|
- Material type (References Terms in the "Material types" vocabulary)
|
||||||
|
|
||||||
#### Lab Test Logs
|
#### Lab Test Logs
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ is enabled. The modules included with farmOS define the following vocabularies:
|
||||||
|
|
||||||
- Animal type
|
- Animal type
|
||||||
- Log category
|
- Log category
|
||||||
- Material
|
- Material type
|
||||||
- Plant type
|
- Plant type
|
||||||
- Season
|
- Season
|
||||||
- Unit
|
- Unit
|
||||||
|
|
|
@ -32,13 +32,13 @@ process:
|
||||||
lot_number:
|
lot_number:
|
||||||
plugin: get
|
plugin: get
|
||||||
source: field_farm_lot_number
|
source: field_farm_lot_number
|
||||||
material:
|
material_type:
|
||||||
plugin: sub_process
|
plugin: sub_process
|
||||||
source: field_farm_material
|
source: field_farm_material
|
||||||
process:
|
process:
|
||||||
target_id:
|
target_id:
|
||||||
plugin: migration_lookup
|
plugin: migration_lookup
|
||||||
migration: farm_migrate_taxonomy_material
|
migration: farm_migrate_taxonomy_material_type
|
||||||
source: tid
|
source: tid
|
||||||
method:
|
method:
|
||||||
plugin: get
|
plugin: get
|
||||||
|
@ -51,5 +51,5 @@ process:
|
||||||
source: field_farm_input_source
|
source: field_farm_input_source
|
||||||
migration_dependencies:
|
migration_dependencies:
|
||||||
required:
|
required:
|
||||||
- farm_migrate_taxonomy_material
|
- farm_migrate_taxonomy_material_type
|
||||||
optional: { }
|
optional: { }
|
||||||
|
|
|
@ -3,10 +3,10 @@ status: true
|
||||||
dependencies:
|
dependencies:
|
||||||
enforced:
|
enforced:
|
||||||
module:
|
module:
|
||||||
- farm_material
|
- farm_material_type
|
||||||
- farm_migrate
|
- farm_migrate
|
||||||
id: farm_migrate_taxonomy_material
|
id: farm_migrate_taxonomy_material_type
|
||||||
label: 'Taxonomy terms (Materials)'
|
label: 'Taxonomy terms (Material types)'
|
||||||
migration_group: farm_migrate_taxonomy
|
migration_group: farm_migrate_taxonomy
|
||||||
migration_tags:
|
migration_tags:
|
||||||
- 'Drupal 7'
|
- 'Drupal 7'
|
||||||
|
@ -23,7 +23,7 @@ process:
|
||||||
# Hard-code the vocabulary.
|
# Hard-code the vocabulary.
|
||||||
vid:
|
vid:
|
||||||
plugin: default_value
|
plugin: default_value
|
||||||
default_value: material
|
default_value: material_type
|
||||||
# Maintain the term ID.
|
# Maintain the term ID.
|
||||||
tid:
|
tid:
|
||||||
plugin: get
|
plugin: get
|
||||||
|
@ -36,7 +36,7 @@ process:
|
||||||
source: parent
|
source: parent
|
||||||
-
|
-
|
||||||
plugin: migration_lookup
|
plugin: migration_lookup
|
||||||
migration: farm_migrate_taxonomy_material
|
migration: farm_migrate_taxonomy_material_type
|
||||||
parent:
|
parent:
|
||||||
plugin: default_value
|
plugin: default_value
|
||||||
default_value: 0
|
default_value: 0
|
|
@ -5,4 +5,4 @@ package: farmOS Logs
|
||||||
core_version_requirement: ^9
|
core_version_requirement: ^9
|
||||||
dependencies:
|
dependencies:
|
||||||
- farm:farm_entity
|
- 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);
|
$fields['lot_number'] = $this->farmFieldFactory->bundleFieldDefinition($options);
|
||||||
|
|
||||||
// Material.
|
// Material type.
|
||||||
$options = [
|
$options = [
|
||||||
'type' => 'entity_reference',
|
'type' => 'entity_reference',
|
||||||
'label' => $this->t('Material'),
|
'label' => $this->t('Material type'),
|
||||||
'description' => $this->t('What materials are being applied?'),
|
'description' => $this->t('What type of materials are being applied?'),
|
||||||
'target_type' => 'taxonomy_term',
|
'target_type' => 'taxonomy_term',
|
||||||
'target_bundle' => 'material',
|
'target_bundle' => 'material_type',
|
||||||
'auto_create' => TRUE,
|
'auto_create' => TRUE,
|
||||||
'multiple' => TRUE,
|
'multiple' => TRUE,
|
||||||
'weight' => [
|
'weight' => [
|
||||||
|
@ -46,7 +46,7 @@ class Input extends FarmLogType {
|
||||||
'view' => -50,
|
'view' => -50,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
$fields['material'] = $this->farmFieldFactory->bundleFieldDefinition($options);
|
$fields['material_type'] = $this->farmFieldFactory->bundleFieldDefinition($options);
|
||||||
|
|
||||||
// Method.
|
// Method.
|
||||||
$options = [
|
$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
|
name: Material types vocabulary
|
||||||
description: Provides a Materials vocabulary.
|
description: Provides a Material types vocabulary.
|
||||||
type: module
|
type: module
|
||||||
package: farmOS Taxonomies
|
package: farmOS Taxonomies
|
||||||
core_version_requirement: ^9
|
core_version_requirement: ^9
|
Loading…
Reference in a new issue