From 140c3cb4821e8a34df462c86f75795e3811637e3 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Wed, 5 Jun 2024 13:07:29 -0300 Subject: [PATCH] Backwards compatibility. --- islandora.module | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/islandora.module b/islandora.module index 8fa478a7f..6fde6912b 100644 --- a/islandora.module +++ b/islandora.module @@ -652,3 +652,16 @@ function islandora_preprocess_views_view_table(&$variables) { } } } + +/** + * Implements hook_field_info_alter(). + * + * @todo Remove once minimum version supported is at least 10.2.0. + */ +function islandora_field_info_alter(array &$info): void { + // Allow module to work with versions of older versions of Drupal. + if (\version_compare(\Drupal::VERSION, '10.1.9999', '<')) { + $info['reference']['category'] = new TranslatableMarkup("Reference"); + } +} +