diff --git a/composer.lock b/composer.lock index 0168a001..7eef7199 100644 --- a/composer.lock +++ b/composer.lock @@ -1333,12 +1333,12 @@ "source": { "type": "git", "url": "https://github.com/elifesciences/patterns-php.git", - "reference": "745774723e82d5b720afddfef43f96056a7b1a93" + "reference": "646034fa112fd61957ba24f52d2b0408cf0e0f43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/elifesciences/patterns-php/zipball/745774723e82d5b720afddfef43f96056a7b1a93", - "reference": "745774723e82d5b720afddfef43f96056a7b1a93", + "url": "https://api.github.com/repos/elifesciences/patterns-php/zipball/646034fa112fd61957ba24f52d2b0408cf0e0f43", + "reference": "646034fa112fd61957ba24f52d2b0408cf0e0f43", "shasum": "" }, "require": { @@ -1379,7 +1379,7 @@ "support": { "source": "https://github.com/elifesciences/patterns-php/tree/master" }, - "time": "2023-03-31T10:34:00+00:00" + "time": "2023-03-31T15:00:46+00:00" }, { "name": "fabpot/goutte", diff --git a/src/ViewModel/Converter/ArticleContentHeaderConverter.php b/src/ViewModel/Converter/ArticleContentHeaderConverter.php index 6b636ecb..57e381e2 100644 --- a/src/ViewModel/Converter/ArticleContentHeaderConverter.php +++ b/src/ViewModel/Converter/ArticleContentHeaderConverter.php @@ -76,7 +76,9 @@ public function convert($object, string $viewModel = null, array $context = []) '#cite-this-article', new ViewModel\SocialMediaSharersNew( strip_tags($object->getFullTitle()), - "https://doi.org/{$object->getDoi()}" + "https://doi.org/{$object->getDoi()}", + true, + true ), !empty($context['metrics']) ? ViewModel\ContextualData::withMetrics($context['metrics']) : null, null, diff --git a/src/ViewModel/Converter/ArticleModalConverter.php b/src/ViewModel/Converter/ArticleModalConverter.php index c3a071d0..2ba5f5d4 100644 --- a/src/ViewModel/Converter/ArticleModalConverter.php +++ b/src/ViewModel/Converter/ArticleModalConverter.php @@ -47,7 +47,9 @@ public function convert($object, string $viewModel = null, array $context = []) ViewModel\Button::clipboard('Copy to clipboard', "https://doi.org/{$object->getDoi()}"), new ViewModel\SocialMediaSharersNew( strip_tags($object->getFullTitle()), - "https://doi.org/{$object->getDoi()}" + "https://doi.org/{$object->getDoi()}", + true, + true ), ]; diff --git a/src/ViewModel/Converter/BlogArticleContentHeaderConverter.php b/src/ViewModel/Converter/BlogArticleContentHeaderConverter.php index 6fdfe3d5..f4336c33 100644 --- a/src/ViewModel/Converter/BlogArticleContentHeaderConverter.php +++ b/src/ViewModel/Converter/BlogArticleContentHeaderConverter.php @@ -44,7 +44,8 @@ public function convert($object, string $viewModel = null, array $context = []) new ViewModel\SocialMediaSharersNew( strip_tags($object->getTitle()), $this->urlGenerator->generate('inside-elife-article', [$object], UrlGeneratorInterface::ABSOLUTE_URL), - false + false, + true ), !empty($context['metrics']) ? ViewModel\ContextualData::withMetrics($context['metrics']) : null, null, diff --git a/src/ViewModel/Converter/DigestContentHeaderConverter.php b/src/ViewModel/Converter/DigestContentHeaderConverter.php index daef6175..84ff0626 100644 --- a/src/ViewModel/Converter/DigestContentHeaderConverter.php +++ b/src/ViewModel/Converter/DigestContentHeaderConverter.php @@ -47,7 +47,8 @@ public function convert($object, string $viewModel = null, array $context = []) new ViewModel\SocialMediaSharersNew( strip_tags($object->getTitle()), $this->urlGenerator->generate('digest', [$object], UrlGeneratorInterface::ABSOLUTE_URL), - false + false, + true ), !empty($context['metrics']) ? ViewModel\ContextualData::withMetrics($context['metrics']) : null, null,