From ec02c334e065d09507a8f36812574e9f3ba8973a Mon Sep 17 00:00:00 2001 From: Michael Stenta Date: Mon, 8 Apr 2019 13:59:41 -0400 Subject: [PATCH] Describe missing taxonomies with hook_farm_ui_entities(): log categories, input materials, quantity units, season, and soil names. --- modules/farm/farm_fields/farm_fields.module | 14 ++++++++++++++ .../farm_log/farm_log_input/farm_log_input.module | 6 ++++++ modules/farm/farm_quantity/farm_quantity.module | 14 ++++++++++++++ modules/farm/farm_season/farm_season.module | 14 ++++++++++++++ modules/farm/farm_soil/farm_soil.module | 14 ++++++++++++++ 5 files changed, 62 insertions(+) diff --git a/modules/farm/farm_fields/farm_fields.module b/modules/farm/farm_fields/farm_fields.module index 2aa565178e..7612a00152 100644 --- a/modules/farm/farm_fields/farm_fields.module +++ b/modules/farm/farm_fields/farm_fields.module @@ -6,6 +6,20 @@ include_once 'farm_fields.features.inc'; +/** + * Implements hook_farm_ui_entities(). + */ +function farm_fields_farm_ui_entities() { + return array( + 'taxonomy_term' => array( + 'farm_log_categories' => array( + 'label' => t('Log category'), + 'label_plural' => t('Log categories'), + ), + ), + ); +} + /** * Implements hook_farm_access_perms(). */ diff --git a/modules/farm/farm_log/farm_log_input/farm_log_input.module b/modules/farm/farm_log/farm_log_input/farm_log_input.module index 90e21cde4f..59459fcf53 100644 --- a/modules/farm/farm_log/farm_log_input/farm_log_input.module +++ b/modules/farm/farm_log/farm_log_input/farm_log_input.module @@ -21,6 +21,12 @@ function farm_log_input_farm_ui_entities() { 'weight' => 0, ), ), + 'taxonomy_term' => array( + 'farm_materials' => array( + 'label' => t('Material'), + 'label_plural' => t('Materials'), + ), + ), ); } diff --git a/modules/farm/farm_quantity/farm_quantity.module b/modules/farm/farm_quantity/farm_quantity.module index 3f85ac103d..3d68507200 100644 --- a/modules/farm/farm_quantity/farm_quantity.module +++ b/modules/farm/farm_quantity/farm_quantity.module @@ -7,6 +7,20 @@ // Include Features code. include_once 'farm_quantity.features.inc'; +/** + * Implements hook_farm_ui_entities(). + */ +function farm_quantity_farm_ui_entities() { + return array( + 'taxonomy_term' => array( + 'farm_quantity_units' => array( + 'label' => t('Quantity unit'), + 'label_plural' => t('Quantity units'), + ), + ), + ); +} + /** * Implements hook_restws_field_collection_info(). */ diff --git a/modules/farm/farm_season/farm_season.module b/modules/farm/farm_season/farm_season.module index 0baa864f4f..4c4253676d 100644 --- a/modules/farm/farm_season/farm_season.module +++ b/modules/farm/farm_season/farm_season.module @@ -5,3 +5,17 @@ */ include_once 'farm_season.features.inc'; + +/** + * Implements hook_farm_ui_entities(). + */ +function farm_season_farm_ui_entities() { + return array( + 'taxonomy_term' => array( + 'farm_season' => array( + 'label' => t('Season'), + 'label_plural' => t('Seasons'), + ), + ), + ); +} diff --git a/modules/farm/farm_soil/farm_soil.module b/modules/farm/farm_soil/farm_soil.module index cf1d8de903..9311fe8af4 100644 --- a/modules/farm/farm_soil/farm_soil.module +++ b/modules/farm/farm_soil/farm_soil.module @@ -6,6 +6,20 @@ include_once 'farm_soil.features.inc'; +/** + * Implements hook_farm_ui_entities(). + */ +function farm_soil_farm_ui_entities() { + return array( + 'taxonomy_term' => array( + 'farm_soil_names' => array( + 'label' => t('Soil name'), + 'label_plural' => t('Soil names'), + ), + ), + ); +} + /** * Implements hook_farm_log_categories(). */