diff --git a/module/finc/src/finc/ILS/Driver/FincILS.php b/module/finc/src/finc/ILS/Driver/FincILS.php index e2c75cf9a7b5addd24f88f62894e9429780ac64b..5519ef758abf49148f21605f4c690e89f4b5f508 100644 --- a/module/finc/src/finc/ILS/Driver/FincILS.php +++ b/module/finc/src/finc/ILS/Driver/FincILS.php @@ -443,6 +443,39 @@ class FincILS extends PAIA implements LoggerAwareInterface * Custom PAIA methods *********************************************/ + /** + * Gets additional array fields for the item. + * Override this method in your custom PAIA driver if necessary. + * + * @param array $fee The fee array from PAIA + * + * @return array Additional fee data for the item + */ + protected function getAdditionalFeeData($fee, $patron = null) + { + $additionalData = []; + // The title is always displayed to the user in fines view if no record can + // be found for current fee. So always populate the title with content of + // about field. + if (isset($fee['about'])) { + $additionalData['title'] = $fee['about']; + } + + // custom PAIA fields + // fee.about 0..1 string textual information about the fee + // fee.item 0..1 URI item that caused the fee + // fee.feeid 0..1 URI URI of the type of service that + // caused the fee + $additionalData['feeid'] = (isset($fee['feeid']) + ? $fee['feeid'] : null); + $additionalData['about'] = (isset($fee['about']) + ? $fee['about'] : null); + $additionalData['item'] = (isset($fee['item']) + ? $fee['item'] : null); + + return $additionalData; + } + /** * Patron Login *