Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk committed Jun 26, 2023
1 parent 09645a9 commit 4320028
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Classes/Common/Doc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4320028

Please sign in to comment.