From 59eb9f1b345c3706b6630e7932cbef3fa577f116 Mon Sep 17 00:00:00 2001 From: Kaitlin Newson Date: Wed, 12 Jun 2024 11:54:03 -0300 Subject: [PATCH] pkp/pkp-lib#9927 add cover image to onix export data --- .../onix30/filter/MonographONIX30XmlFilter.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php b/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php index 0566beee530..f8cfd5da974 100644 --- a/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php +++ b/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php @@ -480,6 +480,17 @@ public function createProductNode($doc, $submission, $publicationFormat) $textContentNode->appendChild($this->_buildTextNode($doc, 'ContentAudience', '00')); // Any audience $textContentNode->appendChild($this->_buildTextNode($doc, 'Text', $abstract)); // Any audience + $supportingResourceNode = $doc->createElementNS($deployment->getNamespace(), 'SupportingResource'); + $collateralDetailNode->appendChild($supportingResourceNode); + $supportingResourceNode->appendChild($this->_buildTextNode($doc, 'ResourceContentType', '01')); // Front cover + $supportingResourceNode->appendChild($this->_buildTextNode($doc, 'ContentAudience', '00')); // Any audience + $supportingResourceNode->appendChild($this->_buildTextNode($doc, 'ResourceMode', '03')); // A still image + + $resourceVersionNode = $doc->createElementNS($deployment->getNamespace(), 'ResourceVersion'); + $supportingResourceNode->appendChild($resourceVersionNode); + $resourceVersionNode->appendChild($this->_buildTextNode($doc, 'ResourceForm', '01')); // Linkable resource + $resourceVersionNode->appendChild($this->_buildTextNode($doc, 'ResourceLink', $publication->getLocalizedCoverImageUrl($context->getId()))); + /* --- Publishing Detail --- */ $publishingDetailNode = $doc->createElementNS($deployment->getNamespace(), 'PublishingDetail');