Skip to content

Commit

Permalink
pkp/pkp-lib#9927 add cover image to onix export data
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitlinnewson committed Jun 11, 2024
1 parent a402b13 commit c437da0
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,17 @@ 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');
Expand Down

0 comments on commit c437da0

Please sign in to comment.