From 30b78ce0ca86ff15117d3824384aa67fdb70f09d Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Fri, 8 Nov 2024 10:55:50 -0400 Subject: [PATCH] link image as well as text --- src/Plugin/Field/FieldFormatter/OrcidFieldFormatter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Plugin/Field/FieldFormatter/OrcidFieldFormatter.php b/src/Plugin/Field/FieldFormatter/OrcidFieldFormatter.php index 9cc0f6b..9908162 100644 --- a/src/Plugin/Field/FieldFormatter/OrcidFieldFormatter.php +++ b/src/Plugin/Field/FieldFormatter/OrcidFieldFormatter.php @@ -42,7 +42,8 @@ class OrcidFieldFormatter extends FormatterBase { $prefix = 'https://orcid.org/'; // Assumes all field values are just plain text or strings values and not full orcid URLS. $orcidUrl = $prefix . $item->value; - $imgSrc = ''; + $imgSrc = ''; $link = Link::fromTextAndUrl($orcidUrl, Url::fromUri($orcidUrl)); $element[$delta] = [$link->toRenderable()]; $element[$delta][0]['#prefix'] = $imgSrc;