From 9227f828d6608519b0baab63ad30118f0e2a551c Mon Sep 17 00:00:00 2001 From: matze Date: Tue, 10 Dec 2024 23:07:44 +0100 Subject: [PATCH] change chemical to be taxonomy term --- config/install/asset.type.chemical.yml | 12 ------------ src/Plugin/Asset/AssetType/Chemical.php | 23 ----------------------- src/Plugin/Asset/AssetType/Ingredient.php | 7 ++++--- 3 files changed, 4 insertions(+), 38 deletions(-) delete mode 100644 config/install/asset.type.chemical.yml delete mode 100644 src/Plugin/Asset/AssetType/Chemical.php diff --git a/config/install/asset.type.chemical.yml b/config/install/asset.type.chemical.yml deleted file mode 100644 index 53b7388..0000000 --- a/config/install/asset.type.chemical.yml +++ /dev/null @@ -1,12 +0,0 @@ -langcode: en -status: true -dependencies: - enforced: - module: - - farm_agrikern -id: chemical -label: Chemical -description: 'Chemical Asset' -name_pattern: 'Chemical asset [asset:id]' -workflow: asset_default -new_revision: true \ No newline at end of file diff --git a/src/Plugin/Asset/AssetType/Chemical.php b/src/Plugin/Asset/AssetType/Chemical.php deleted file mode 100644 index dda418f..0000000 --- a/src/Plugin/Asset/AssetType/Chemical.php +++ /dev/null @@ -1,23 +0,0 @@ - [ 'type' => 'entity_reference', 'label' => $this->t('Chemical'), - 'description' => $this->t('What chemical does the ingredient track?'), - 'target_type' => 'asset', + 'description' => $this->t("What chemical does the ingredient track?"), + 'target_type' => 'taxonomy_term', 'target_bundle' => 'chemical', - 'multiple' => FALSE, + 'auto_create' => FALSE, 'required' => TRUE, + 'multiple' => FALSE, ], 'amount_field' => [ 'type' => 'fraction',