From ed0e3df8a7ad01f386c42701963bb3c59eab9b20 Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Fri, 31 May 2024 10:36:44 -0300 Subject: [PATCH] Set the thumbnail first. --- src/Plugin/OaiMetadataMap/DgiStandard.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Plugin/OaiMetadataMap/DgiStandard.php b/src/Plugin/OaiMetadataMap/DgiStandard.php index 3c43fc0..d4e165d 100644 --- a/src/Plugin/OaiMetadataMap/DgiStandard.php +++ b/src/Plugin/OaiMetadataMap/DgiStandard.php @@ -393,7 +393,9 @@ public function addThumbnail(ContentEntityInterface $entity, $dest) { $fid = $media->getSource()->getSourceFieldValue($media); $file = $this->entityTypeManager->getStorage('file')->load($fid); - $this->elements[$dest][] = $file->createFileUrl(FALSE); + // XXX: Some harvesters want the thumbnail to be first so let's prepend + // it. + array_unshift($this->elements[$dest], $file->createFileUrl(FALSE)); } }