-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sven Wappler
committed
Nov 17, 2023
1 parent
5f8bef0
commit d350b55
Showing
6 changed files
with
56 additions
and
192 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
Classes/EventListener/AfterCacheableContentIsGeneratedEventListener.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace WapplerSystems\A21glossary\EventListener; | ||
|
||
|
||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; | ||
use TYPO3\CMS\Frontend\Event\AfterCacheableContentIsGeneratedEvent; | ||
use WapplerSystems\A21glossary\Processor; | ||
|
||
final class AfterCacheableContentIsGeneratedEventListener | ||
{ | ||
public function __invoke(AfterCacheableContentIsGeneratedEvent $event): void | ||
{ | ||
|
||
$content = $event->getController()->content; | ||
|
||
|
||
$tsConfig = GeneralUtility::makeInstance(ConfigurationManagerInterface::class) | ||
->getConfiguration( | ||
ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT | ||
); | ||
|
||
$config = $tsConfig['plugin.']['tx_a21glossary.']['settings.'] ?? []; | ||
|
||
$processor = GeneralUtility::makeInstance(Processor::class); | ||
$event->getController()->content = $processor->main($content, $config); | ||
|
||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters