Skip to content

Commit 7246ec4

Browse files
committed
Fixed access to TypoScript
1 parent 40e444c commit 7246ec4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Classes/Frontend/TypolinkIcons.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ public function addLinkIcon(AfterLinkIsGeneratedEvent $event): void {
1616
return;
1717
}
1818

19-
$classes = GeneralUtility::trimExplode(' ', $tagAttributes['class'], true);
20-
21-
$svgMapping = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_vierwdbase.']['linkIcons.'];
19+
$request = $event->getContentObjectRenderer()->getRequest();
20+
$typoScript = $request->getAttribute('frontend.typoscript')->getSetupArray();
21+
$svgMapping = $typoScript['plugin.']['tx_vierwdbase.']['linkIcons.'] ?? null;
2222
if (!$svgMapping) {
2323
return;
2424
}
2525

26+
$classes = GeneralUtility::trimExplode(' ', $tagAttributes['class'], true);
27+
2628
if (in_array('external-link-new-window', $classes)) {
2729
$linkResult = $linkResult->withAttribute('target', '_blank');
2830
$rel = GeneralUtility::trimExplode(' ', $tagAttributes['rel'], true);

0 commit comments

Comments
 (0)