Skip to content

Commit

Permalink
[FEATURE] allow override of DOI redirect page id
Browse files Browse the repository at this point in the history
  • Loading branch information
h3nn3s committed Aug 8, 2023
1 parent 7424793 commit 5fc95be
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Classes/Finishers/SendinblueFinisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ protected function getDoiTemplateId(): int
return $this->extensionConfiguration->getDoiTemplateId();
}

protected function getDoiRedirectPageId(): int
{
$doiRedirectPageId = (int)$this->parseOption('doiRedirectPageId');
if ($doiRedirectPageId) {
return $doiRedirectPageId;
}
return $this->extensionConfiguration->getDoiRedirectPageId();
}

protected function newsletterSubscriptionIsEnabled(): bool
{
return $this->isEnabled();
Expand Down Expand Up @@ -153,7 +162,7 @@ protected function getAttributes(): object
protected function getRedirectionUrl(): string
{
$typolinkConfiguration = [
'parameter' => $this->extensionConfiguration->getDoiRedirectPageId(),
'parameter' => $this->getDoiRedirectPageId(),
'forceAbsoluteUrl' => true,
];
return $this->getTypoScriptFrontendController()->cObj->typoLink_URL($typolinkConfiguration);
Expand Down

0 comments on commit 5fc95be

Please sign in to comment.