diff --git a/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php b/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php index 295fa6477787528846016bd69fb48f959e3cc542..a42c9843325674f5da4965af4a5a4bd528b2ae21 100644 --- a/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php +++ b/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php @@ -43,6 +43,9 @@ use VuFind\View\Helper\Root\RecordDataFormatter; */ class RecordDataFormatterFactory { + + use MultiDataFieldsTrait; + /** * Create the helper. * @@ -267,15 +270,10 @@ class RecordDataFormatterFactory 'getLanguages', 'data-transEscCommaSepLang.phtml' ); - $spec->setTemplateLine( + $spec->setMultiLine( 'Additionals', 'getAdditionals', - 'data-additionals.phtml', - [ - 'labelFunction' => function () { - return null; - } - ] + [$this,'additionals'] ); return $spec->getArray(); } @@ -428,27 +426,20 @@ class RecordDataFormatterFactory 'getAllRecordLinks', 'data-allRecordLinks.phtml' ); - $spec->setTemplateLine( + $spec->setMultiLine( 'Additionals', 'getAdditionals', - 'data-additionals.phtml', - [ - 'labelFunction' => function () { - return null; - } - ] + [$this,'additionals'] ); $spec->setTemplateLine( 'Source', 'getMegaCollection', 'data-escapeHtml.phtml' ); - $spec->setTemplateLine( - null, + $spec->setMultiLine( + "Other Relationship Entry", 'getOtherRelationshipEntry', - 'data-otherRelationshipEntry.phtml', - [ - ] + [$this,'otherRelationshipEntry'] ); $spec->setTemplateLine( 'Notes', @@ -750,15 +741,10 @@ class RecordDataFormatterFactory 'context' => ['class' => 'recordIdentifiers'] ] ); - $spec->setTemplateLine( + $spec->setMultiLine( 'Events', - true, - 'data-events.phtml', - [ - 'labelFunction' => function () { - return null; - } - ] + 'getEvents', + [$this,'events'] ); // , context: "recordEvents" $spec->setTemplateLine( @@ -914,6 +900,11 @@ class RecordDataFormatterFactory 'data-childRecords.phtml', ['allowZero' => false] ); + $spec->setMultiLine( + 'Additionals', + 'getAdditionals', + [$this,'additionals'] + ); /* finc: remove 'Online Access' in record-details #13770 - VE */ /* $spec->setTemplateLine('Online Access', true, 'data-onlineAccess.phtml'); */ $spec->setTemplateLine( @@ -936,15 +927,10 @@ class RecordDataFormatterFactory 'getMegaCollection', 'data-escapeHtml.phtml' ); - $spec->setTemplateLine( - 'OtherRelationshipEntry', + $spec->setMultiLine( + "Other Relationship Entry", 'getOtherRelationshipEntry', - 'data-otherRelationshipEntry.phtml', - [ - 'labelFunction' => function () { - return null; - } - ] + [$this,'otherRelationshipEntry'] ); $spec->setTemplateLine( 'Notes',