diff --git a/module/fid/src/View/Helper/Root/RecordDataFormatterFactory.php b/module/fid/src/View/Helper/Root/RecordDataFormatterFactory.php index 185a746ac8c3583c87bea894c1e135f0e253564f..4de990d6e76925db998b6a784796869f9c2c6e01 100644 --- a/module/fid/src/View/Helper/Root/RecordDataFormatterFactory.php +++ b/module/fid/src/View/Helper/Root/RecordDataFormatterFactory.php @@ -26,10 +26,11 @@ */ namespace fid\View\Helper\Root; +use finc\View\Helper\Root\RecordDataFormatterFactory as FincRecordDataFormatterFactory; use VuFind\View\Helper\Root\RecordDataFormatter; use VuFind\View\Helper\Root\RecordDataFormatter\SpecBuilder; -class RecordDataFormatterFactory +class RecordDataFormatterFactory extends FincRecordDataFormatterFactory { /** * Create the helper. @@ -38,7 +39,7 @@ class RecordDataFormatterFactory */ public function __invoke() { - $helper = new RecordDataFormatter(); + $helper = parent::__invoke(); $helper->setDefaults('fid-acquisition-general', [$this, 'getFidAcquisitionSpecs']); $helper->setDefaults('fid-acquisition-subito-partial-copy', [$this, 'getFidAcquisitionSubitoPartialCopySpecs']); @@ -54,7 +55,7 @@ class RecordDataFormatterFactory public function getFidAcquisitionSpecBuilder() { $spec = new SpecBuilder(); - $spec->setLine('Title','getTitle'); + $spec->setLine('Title', 'getTitle'); $spec->setTemplateLine( 'Authors/Corporations', 'getDeduplicatedAuthors', @@ -78,7 +79,7 @@ class RecordDataFormatterFactory 'getPrice', 'data-price.phtml' ); - $spec->setLine('Language','getLanguages'); + $spec->setLine('Language', 'getLanguages'); return $spec; } @@ -101,7 +102,7 @@ class RecordDataFormatterFactory public function getFidAcquisitionSubitoPartialCopySpecs() { $spec = $this->getFidAcquisitionSpecBuilder(); - $spec->setLine('fid::number_of_pages','getNumberOfPages'); + $spec->setLine('fid::number_of_pages', 'getNumberOfPages'); return $spec->getArray(); } }