From 432002890c384b275a31a00dc45d56ddd49f7f28 Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Mon, 26 Jun 2023 20:17:42 +0200 Subject: [PATCH] f --- Classes/Common/Doc.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Classes/Common/Doc.php b/Classes/Common/Doc.php index 30f72fa9cd..85d44847e8 100644 --- a/Classes/Common/Doc.php +++ b/Classes/Common/Doc.php @@ -478,10 +478,12 @@ public static function &getInstance($location, $settings = [], $forceReload = fa // Sanitize input. $pid = max(intval($settings['storagePid']), 0); + $metadataRepository = GeneralUtility::makeInstance(MetadataRepository::class); + $structureRepository = GeneralUtility::makeInstance(StructureRepository::class); if ($documentFormat == 'METS') { - $instance = new MetsDocument($location, $pid, $xml); + $instance = new MetsDocument($location, $pid, $xml, $metadataRepository, $structureRepository); } elseif ($documentFormat == 'IIIF') { - $instance = new IiifManifest($location, $pid, $iiif); + $instance = new IiifManifest($location, $pid, $iiif, $metadataRepository, $structureRepository); } if ($instance) { @@ -1232,9 +1234,11 @@ protected function _setCPid($value) * * @return void */ - protected function __construct($location, $pid, $preloadedDocument) + protected function __construct($location, $pid, $preloadedDocument, $metadataRepository, $structureRepository) { $this->pid = $pid; + $this->metadataRepository = $metadataRepository; + $this->structureRepository = $structureRepository; $this->setPreloadedDocument($preloadedDocument); $this->init($location); $this->establishRecordId($pid);