From 99e125e9bda6ebf841049dc3eec1f4d1f976e5e8 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Wed, 11 Nov 2020 16:00:09 -0500
Subject: [PATCH] EDS improvement: retrieve subtitles correctly.

---
 module/VuFind/src/VuFind/RecordDriver/EDS.php | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/module/VuFind/src/VuFind/RecordDriver/EDS.php b/module/VuFind/src/VuFind/RecordDriver/EDS.php
index b9e09aab793..96ac1538c5e 100644
--- a/module/VuFind/src/VuFind/RecordDriver/EDS.php
+++ b/module/VuFind/src/VuFind/RecordDriver/EDS.php
@@ -81,6 +81,21 @@ class EDS extends DefaultRecord
         return trim(current($parts));
     }
 
+    /**
+     * Get the subtitle (if any) of the record.
+     *
+     * @return string
+     */
+    public function getSubtitle()
+    {
+        $title = $this->getTitle();
+        if (null == $title) {
+            return '';
+        }
+        $parts = explode(':', $title, 2);
+        return count($parts) > 1 ? trim(array_pop($parts)) : '';
+    }
+
     /**
      * Get the abstract (summary) of the record.
      *
-- 
GitLab