Skip to content

Commit

Permalink
Add missing param $fileUse to getPhysicalElements() function
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk committed Jul 2, 2024
1 parent 8bebcc5 commit 704b450
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Classes/Common/MetsDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -1206,10 +1206,10 @@ protected function magicGetPhysicalStructure(): array
$this->physicalStructureInfo[$id]['orderlabel'] = isset($firstNode['ORDERLABEL']) ? (string) $firstNode['ORDERLABEL'] : '';
$this->physicalStructureInfo[$id]['type'] = (string) $firstNode['TYPE'];
$this->physicalStructureInfo[$id]['contentIds'] = isset($firstNode['CONTENTIDS']) ? (string) $firstNode['CONTENTIDS'] : '';

$this->getFileRepresentation($id, $firstNode);

$this->physicalStructure = $this->getPhysicalElements($elementNodes);
$this->physicalStructure = $this->getPhysicalElements($elementNodes, $fileUse);
}
$this->physicalStructureLoaded = true;
}
Expand All @@ -1234,7 +1234,7 @@ private function getFileRepresentation(string $id, SimpleXMLElement $physicalNod
foreach ($physicalNode->children('http://www.loc.gov/METS/')->fptr as $fptr) {
$fileId = (string) $fptr->attributes()->FILEID;
// Check if file has valid @USE attribute.
if (!empty($fileUse[$fileId ])) {
if (!empty($fileUse[$fileId])) {
$this->physicalStructureInfo[$id]['files'][$fileUse[$fileId]] = $fileId;
}
}
Expand All @@ -1246,10 +1246,11 @@ private function getFileRepresentation(string $id, SimpleXMLElement $physicalNod
* @access private
*
* @param array $elementNodes
* @param array $fileUse
*
* @return array
*/
private function getPhysicalElements(array $elementNodes): array
private function getPhysicalElements(array $elementNodes, array $fileUse): array
{
$elements = [];

Expand Down

0 comments on commit 704b450

Please sign in to comment.