From 024a82f286d46f68f387dfd16b61f18d02f0a54d Mon Sep 17 00:00:00 2001 From: Michael Stein Date: Fri, 9 Feb 2024 15:21:18 +0100 Subject: [PATCH 1/9] add dependeny injection support --- Configuration/Services.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Configuration/Services.yaml diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml new file mode 100644 index 0000000..b7bfdaa --- /dev/null +++ b/Configuration/Services.yaml @@ -0,0 +1,8 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + In2code\Ipandlanguageredirect\: + resource: '../Classes/*' From 597e88db6b19dfd7817cf52f3238695d91ef77e6 Mon Sep 17 00:00:00 2001 From: Michael Stein Date: Fri, 9 Feb 2024 15:22:18 +0100 Subject: [PATCH 2/9] get redirectservice via DI --- Classes/Controller/RedirectController.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Classes/Controller/RedirectController.php b/Classes/Controller/RedirectController.php index 6150c7e..b7430d0 100644 --- a/Classes/Controller/RedirectController.php +++ b/Classes/Controller/RedirectController.php @@ -37,6 +37,11 @@ class RedirectController extends ActionController ] ]; + public function __construct( + private readonly RedirectService $redirectService + ) {} + + /** * Enrich call with ip-address if not given * @@ -79,8 +84,7 @@ public function redirectAction( string $domain = '' ): ResponseInterface { /** @noinspection PhpMethodParametersCountMismatchInspection */ - $redirectService = $this->objectManager->get( - RedirectService::class, + $this->redirectService->set( $browserLanguage, $referrer, $ipAddress, @@ -89,7 +93,7 @@ public function redirectAction( $countryCode, $domain ); - return $this->jsonResponse(json_encode($redirectService->buildParameters())); + return $this->jsonResponse(json_encode($this->redirectService->buildParameters())); } /** From 366be6a760000f17bd66ea969ba13e23309c9a8b Mon Sep 17 00:00:00 2001 From: Michael Stein Date: Fri, 9 Feb 2024 15:23:56 +0100 Subject: [PATCH 3/9] get uribuilder via DI --- Classes/Domain/Service/RedirectService.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Classes/Domain/Service/RedirectService.php b/Classes/Domain/Service/RedirectService.php index 052994f..3773aa7 100644 --- a/Classes/Domain/Service/RedirectService.php +++ b/Classes/Domain/Service/RedirectService.php @@ -104,6 +104,11 @@ class RedirectService 'events' => ['none'] ]; + + public function __construct( + private readonly UriBuilder $uriBuilder + ) {} + /** * @param string $browserLanguage * @param string $referrer @@ -113,7 +118,7 @@ class RedirectService * @param string $countryCode * @param string $domain */ - public function __construct( + public function set( string $browserLanguage, string $referrer, string $ipAddress, @@ -238,11 +243,10 @@ protected function getBestConfiguration() */ protected function getUriToPageAndLanguage($pageIdentifier = 0, $languageParameter = 0): string { - $uriBuilder = ObjectUtility::getObjectManager()->get(UriBuilder::class); - $uriBuilder->setTargetPageUid($this->getTargetPageForUriCreation($pageIdentifier)); - $uriBuilder->setCreateAbsoluteUri(true); - $uriBuilder->setArguments([$this->languageParameter => $languageParameter]); - return $uriBuilder->buildFrontendUri(); + $this->uriBuilder->setTargetPageUid($this->getTargetPageForUriCreation($pageIdentifier)); + $this->uriBuilder->setCreateAbsoluteUri(true); + $this->uriBuilder->setArguments([$this->languageParameter => $languageParameter]); + return $this->uriBuilder->buildFrontendUri(); } /** From 7ad9ee1ae56df95058dc4d5c40514b91861c28c5 Mon Sep 17 00:00:00 2001 From: Michael Stein Date: Mon, 12 Feb 2024 10:14:57 +0100 Subject: [PATCH 4/9] make AbstractIpToCountry singleton --- Classes/Domain/Service/IpToCountry/AbstractIpToCountry.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/Domain/Service/IpToCountry/AbstractIpToCountry.php b/Classes/Domain/Service/IpToCountry/AbstractIpToCountry.php index cfce6df..163534c 100644 --- a/Classes/Domain/Service/IpToCountry/AbstractIpToCountry.php +++ b/Classes/Domain/Service/IpToCountry/AbstractIpToCountry.php @@ -3,6 +3,7 @@ namespace In2code\Ipandlanguageredirect\Domain\Service\IpToCountry; use In2code\Ipandlanguageredirect\Utility\ObjectUtility; +use TYPO3\CMS\Core\SingletonInterface; use TYPO3\CMS\Core\Utility\ArrayUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; @@ -10,7 +11,7 @@ /** * Class AbstractIpToCountry */ -abstract class AbstractIpToCountry +abstract class AbstractIpToCountry implements SingletonInterface { /** @@ -23,7 +24,7 @@ abstract class AbstractIpToCountry /** * @param string $ipAddress */ - public function __construct(string $ipAddress) + public function __construct(string $ipAddress = '') { $this->ipAddress = $ipAddress; } From 22e4b2a060a9a379891dce3d8241e4eaedc60281 Mon Sep 17 00:00:00 2001 From: Michael Stein Date: Mon, 12 Feb 2024 10:16:21 +0100 Subject: [PATCH 5/9] switch to makeInstance on loading ipToCountry service --- Classes/Domain/Service/IpToCountry.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Domain/Service/IpToCountry.php b/Classes/Domain/Service/IpToCountry.php index 2dec476..203d547 100644 --- a/Classes/Domain/Service/IpToCountry.php +++ b/Classes/Domain/Service/IpToCountry.php @@ -4,7 +4,9 @@ use In2code\Ipandlanguageredirect\Domain\Service\IpToCountry\IpToCountryInterface; use In2code\Ipandlanguageredirect\Utility\ConfigurationUtility; use In2code\Ipandlanguageredirect\Utility\ObjectUtility; +use Psr\Container\ContainerInterface; use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Extbase\Object\Container\Container as ExtbaseContainer; /** * Class IpToCountry @@ -25,7 +27,7 @@ public function getCountryFromIp(string $ipAddress = ''): string $countryCode = ''; foreach ($this->getClasses() as $class) { /** @var IpToCountryInterface $countryFromIp */ - $countryFromIp = ObjectUtility::getObjectManager()->get($class, $ipAddress); + $countryFromIp = GeneralUtility::makeInstance($class, $ipAddress); try { $countryCode = $countryFromIp->getCountryCodeFromIp(); } catch (\Exception $exception) { From 1cda142c0d2ec5719af928fcd843d472abda2185 Mon Sep 17 00:00:00 2001 From: Michael Stein Date: Mon, 12 Feb 2024 10:19:37 +0100 Subject: [PATCH 6/9] load action set by makeInstance instead of deprecated objectmanager --- Classes/Domain/Model/ActionSet.php | 3 ++- Classes/Domain/Service/RedirectService.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/Domain/Model/ActionSet.php b/Classes/Domain/Model/ActionSet.php index db9ee80..e147d86 100644 --- a/Classes/Domain/Model/ActionSet.php +++ b/Classes/Domain/Model/ActionSet.php @@ -2,6 +2,7 @@ namespace In2code\Ipandlanguageredirect\Domain\Model; use In2code\Ipandlanguageredirect\Utility\ObjectUtility; +use TYPO3\CMS\Core\Utility\GeneralUtility; /** * Class ActionSet @@ -34,7 +35,7 @@ public function __construct(array $configuration) $this->rawQuantifierConfiguration = $configuration['quantifier']; $this->rawActionsConfiguration = $configuration['actions']; foreach ($this->rawActionsConfiguration as $actionConfiguration) { - $action = ObjectUtility::getObjectManager()->get( + $action = GeneralUtility::makeInstance( Action::class, $actionConfiguration ); diff --git a/Classes/Domain/Service/RedirectService.php b/Classes/Domain/Service/RedirectService.php index 3773aa7..5696b17 100644 --- a/Classes/Domain/Service/RedirectService.php +++ b/Classes/Domain/Service/RedirectService.php @@ -255,7 +255,7 @@ protected function getUriToPageAndLanguage($pageIdentifier = 0, $languageParamet protected function getEvents() { if ($this->bestEvents === null) { - $actionSet = ObjectUtility::getObjectManager()->get(ActionSet::class, $this->configuration); + $actionSet = GeneralUtility::makeInstance(ActionSet::class, $this->configuration); $actionSet->calculateQuantifiers($this->referrer); $events = $actionSet->getEvents(); } else { From 7e64cae7387d3d7d926ed492a13e8410ddfdd573 Mon Sep 17 00:00:00 2001 From: Michael Stein Date: Mon, 12 Feb 2024 10:34:24 +0100 Subject: [PATCH 7/9] load contentObjectRenderer by DI --- Classes/Controller/RedirectController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Classes/Controller/RedirectController.php b/Classes/Controller/RedirectController.php index b7430d0..720f08f 100644 --- a/Classes/Controller/RedirectController.php +++ b/Classes/Controller/RedirectController.php @@ -10,6 +10,7 @@ use TYPO3\CMS\Core\Utility\HttpUtility; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; use TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentNameException; +use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; /** * Class RedirectController @@ -38,7 +39,8 @@ class RedirectController extends ActionController ]; public function __construct( - private readonly RedirectService $redirectService + private readonly RedirectService $redirectService, + private readonly ContentObjectRenderer $contentObjectRenderer ) {} @@ -110,7 +112,7 @@ public function testAction($set = 0): ResponseInterface 'additionalParams' => FrontendUtility::getParametersStringFromArray($this->testArguments[$set]) . '&type=1555' ]; - $uri = ObjectUtility::getContentObject()->typoLink_URL($configuration); + $uri = $this->contentObjectRenderer->typoLink_URL($configuration); HttpUtility::redirect($uri, HttpUtility::HTTP_STATUS_307); return $this->htmlResponse(); } From bba898338d4ecd0e78f07e7e99c78132a75d69d9 Mon Sep 17 00:00:00 2001 From: Michael Stein Date: Mon, 12 Feb 2024 10:52:01 +0100 Subject: [PATCH 8/9] remove deprecated objectmanager --- Classes/Domain/Model/ConfigurationSet.php | 3 ++- .../IpToCountry/AbstractIpToCountry.php | 3 +-- Classes/Domain/Service/RedirectService.php | 4 ++-- Classes/Utility/ObjectUtility.php | 18 ------------------ 4 files changed, 5 insertions(+), 23 deletions(-) diff --git a/Classes/Domain/Model/ConfigurationSet.php b/Classes/Domain/Model/ConfigurationSet.php index 4436f33..f3879b4 100644 --- a/Classes/Domain/Model/ConfigurationSet.php +++ b/Classes/Domain/Model/ConfigurationSet.php @@ -2,6 +2,7 @@ namespace In2code\Ipandlanguageredirect\Domain\Model; use In2code\Ipandlanguageredirect\Utility\ObjectUtility; +use TYPO3\CMS\Core\Utility\GeneralUtility; /** * Class ConfigurationSet @@ -44,7 +45,7 @@ public function __construct(array $configuration, int $rootpageUid) $this->rawRedirectConfiguration = $configuration['redirectConfiguration']; foreach ($this->rawRedirectConfiguration as $pageIdentifier => $treeConfiguration) { foreach ($treeConfiguration as $languageParameter => $setConfiguration) { - $configuration = ObjectUtility::getObjectManager()->get( + $configuration = GeneralUtility::makeInstance( Configuration::class, $pageIdentifier, $languageParameter, diff --git a/Classes/Domain/Service/IpToCountry/AbstractIpToCountry.php b/Classes/Domain/Service/IpToCountry/AbstractIpToCountry.php index 163534c..f5efc56 100644 --- a/Classes/Domain/Service/IpToCountry/AbstractIpToCountry.php +++ b/Classes/Domain/Service/IpToCountry/AbstractIpToCountry.php @@ -2,7 +2,6 @@ declare(strict_types=1); namespace In2code\Ipandlanguageredirect\Domain\Service\IpToCountry; -use In2code\Ipandlanguageredirect\Utility\ObjectUtility; use TYPO3\CMS\Core\SingletonInterface; use TYPO3\CMS\Core\Utility\ArrayUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -49,7 +48,7 @@ protected function getCurrentIpAddress(): string protected function getConfiguration(string $className, string $path = '') { $settings = []; - $configurationManager = ObjectUtility::getObjectManager()->get(ConfigurationManagerInterface::class); + $configurationManager = GeneralUtility::makeInstance(ConfigurationManagerInterface::class); $setup = $configurationManager->getConfiguration( ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 'Ipandlanguageredirect' diff --git a/Classes/Domain/Service/RedirectService.php b/Classes/Domain/Service/RedirectService.php index 5696b17..2534157 100644 --- a/Classes/Domain/Service/RedirectService.php +++ b/Classes/Domain/Service/RedirectService.php @@ -134,7 +134,7 @@ public function set( $this->rootpageUid = $rootpageUid; $this->countryCodeOverlay = $countryCode; if ($this->countryCodeOverlay === '') { - $ipToCountry = ObjectUtility::getObjectManager()->get(IpToCountry::class); + $ipToCountry = GeneralUtility::makeInstance(IpToCountry::class); $this->countryCode = $ipToCountry->getCountryFromIp($ipAddress); } else { $this->countryCode = $this->countryCodeOverlay; @@ -219,7 +219,7 @@ protected function getBestMatchingLanguageParameter() protected function getBestConfiguration() { if ($this->bestConfiguration === null) { - $configurationSet = ObjectUtility::getObjectManager()->get( + $configurationSet = GeneralUtility::makeInstance( ConfigurationSet::class, $this->configuration, $this->rootpageUid diff --git a/Classes/Utility/ObjectUtility.php b/Classes/Utility/ObjectUtility.php index 2ef4543..cd7b6da 100644 --- a/Classes/Utility/ObjectUtility.php +++ b/Classes/Utility/ObjectUtility.php @@ -4,8 +4,6 @@ use TYPO3\CMS\Core\Log\Logger; use TYPO3\CMS\Core\Log\LogManager; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Object\ObjectManager; -use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; /** @@ -14,14 +12,6 @@ class ObjectUtility { - /** - * @return ObjectManager - */ - public static function getObjectManager() - { - return GeneralUtility::makeInstance(ObjectManager::class); - } - /** * @param string $className * @return Logger @@ -31,14 +21,6 @@ public static function getLogger(string $className): Logger return GeneralUtility::makeInstance(LogManager::class)->getLogger($className); } - /** - * @return ContentObjectRenderer - */ - public static function getContentObject() - { - return self::getObjectManager()->get(ContentObjectRenderer::class); - } - /** * @return TypoScriptFrontendController * @SuppressWarnings(PHPMD.Superglobals) From 9f0fb4dafa670070803dee230b873a615c139dd5 Mon Sep 17 00:00:00 2001 From: Michael Stein Date: Mon, 12 Feb 2024 12:04:42 +0100 Subject: [PATCH 9/9] refactor to single plugins since switchable controller action are deprecated --- Classes/Controller/RedirectController.php | 55 +------------- Classes/Controller/SuggestController.php | 26 +++++++ Classes/Controller/TestController.php | 75 +++++++++++++++++++ Configuration/TCA/Overrides/tt_content.php | 10 +++ Configuration/TypoScript/setup.typoscript | 13 +--- .../{Redirect => Suggest}/Suggest.html | 0 ext_localconf.php | 22 +++++- 7 files changed, 136 insertions(+), 65 deletions(-) create mode 100644 Classes/Controller/SuggestController.php create mode 100644 Classes/Controller/TestController.php rename Resources/Private/Templates/{Redirect => Suggest}/Suggest.html (100%) diff --git a/Classes/Controller/RedirectController.php b/Classes/Controller/RedirectController.php index 720f08f..3b2566e 100644 --- a/Classes/Controller/RedirectController.php +++ b/Classes/Controller/RedirectController.php @@ -4,8 +4,6 @@ use Psr\Http\Message\ResponseInterface; use In2code\Ipandlanguageredirect\Domain\Service\RedirectService; -use In2code\Ipandlanguageredirect\Utility\FrontendUtility; -use In2code\Ipandlanguageredirect\Utility\ObjectUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\HttpUtility; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; @@ -17,30 +15,8 @@ */ class RedirectController extends ActionController { - - /** - * @var array - */ - protected $testArguments = [ - [ - 'browserLanguage' => 'de', - 'referrer' => 'http://www.google.de?foo=bar', - 'ipAddress' => '192.168.0.1', - 'languageUid' => '0', - 'rootpageUid' => '1' - ], - [ - 'browserLanguage' => 'de', - 'referrer' => 'http://www.google.de?foo=bar', - 'ipAddress' => '', - 'languageUid' => '0', - 'rootpageUid' => '1' - ] - ]; - public function __construct( - private readonly RedirectService $redirectService, - private readonly ContentObjectRenderer $contentObjectRenderer + private readonly RedirectService $redirectService ) {} @@ -97,33 +73,4 @@ public function redirectAction( ); return $this->jsonResponse(json_encode($this->redirectService->buildParameters())); } - - /** - * Test the redirectAction directly with some predefined parameters from a given set - * call index.php?id=2&type=1556&tx_ipandlanguageredirect_pi1[set]=1 - * - * @param int $set - * @return void - */ - public function testAction($set = 0): ResponseInterface - { - $configuration = [ - 'parameter' => ObjectUtility::getTyposcriptFrontendController()->id, - 'additionalParams' => - FrontendUtility::getParametersStringFromArray($this->testArguments[$set]) . '&type=1555' - ]; - $uri = $this->contentObjectRenderer->typoLink_URL($configuration); - HttpUtility::redirect($uri, HttpUtility::HTTP_STATUS_307); - return $this->htmlResponse(); - } - - /** - * Render a suggest container that can be slided down in FE - * - * @return void - */ - public function suggestAction(): ResponseInterface - { - return $this->htmlResponse(); - } } diff --git a/Classes/Controller/SuggestController.php b/Classes/Controller/SuggestController.php new file mode 100644 index 0000000..6c07922 --- /dev/null +++ b/Classes/Controller/SuggestController.php @@ -0,0 +1,26 @@ +htmlResponse(); + } +} diff --git a/Classes/Controller/TestController.php b/Classes/Controller/TestController.php new file mode 100644 index 0000000..b39bc41 --- /dev/null +++ b/Classes/Controller/TestController.php @@ -0,0 +1,75 @@ + 'de', + 'referrer' => 'http://www.google.de?foo=bar', + 'ipAddress' => '192.168.0.1', + 'languageUid' => '0', + 'rootpageUid' => '1' + ], + [ + 'browserLanguage' => 'de', + 'referrer' => 'http://www.google.de?foo=bar', + 'ipAddress' => '', + 'languageUid' => '0', + 'rootpageUid' => '1' + ] + ]; + + public function __construct( + private readonly ContentObjectRenderer $contentObjectRenderer + ) + { + } + + /** + * Test the redirectAction directly with some predefined parameters from a given set + * call index.php?id=2&type=1556&tx_ipandlanguageredirect_pi1[set]=1 + * + * @param int $set + * @return void + */ + public function testAction($set = 0): ResponseInterface + { + $configuration = [ + 'parameter' => ObjectUtility::getTyposcriptFrontendController()->id, + 'additionalParams' => + FrontendUtility::getParametersStringFromArray($this->testArguments[$set]) . '&type=1555' + ]; + + $uri = $this->contentObjectRenderer->typoLink_URL($configuration); + + // Create redirect response + $response = $this->responseFactory + ->createResponse(303) + ->withAddedHeader('location', $uri); + + // Return Response directly + return $response; + + // or throw PropagateResponseException + throw new PropagateResponseException($response); + } +} diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index 04dfbfc..adcaa9d 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -8,4 +8,14 @@ 'ipandlanguageredirect', 'Pi1', 'Ipandlanguageredirect' +); +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( + 'ipandlanguageredirect', + 'Test', + 'Ipandlanguageredirect' +); +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( + 'ipandlanguageredirect', + 'Redirect', + 'Ipandlanguageredirect' ); \ No newline at end of file diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index abbabaa..f6ba90f 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -12,7 +12,7 @@ plugin.tx_ipandlanguageredirect { ipToCountry { In2code\Ipandlanguageredirect\Domain\Service\IpToCountry\IpApi { # IpApi Key: Please enter your key for ipapi.co (optional), otherwise extension will have limited access to the service (less then 1000 visitors a day). See ipapi.co for details. - ipApiKey = + ipApiKey = } } } @@ -27,11 +27,8 @@ page { 5 { userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run extensionName = Ipandlanguageredirect - pluginName = Pi1 + pluginName = Suggest vendorName = In2code - controller = Redirect - action = suggest - switchableControllerActions.Redirect.1 = suggest } # Container for informations that will be send to an AJAX service 1555 = COA @@ -126,14 +123,10 @@ redirectAjax { extensionName = Ipandlanguageredirect pluginName = Pi1 vendorName = In2code - controller = Redirect - action = redirect - switchableControllerActions.Redirect.1 = redirect } } testAjax < redirectAjax testAjax { typeNum = 1556 - 10.action = test - 10.switchableControllerActions.Redirect.1 = test + 10.pluginName = Test } diff --git a/Resources/Private/Templates/Redirect/Suggest.html b/Resources/Private/Templates/Suggest/Suggest.html similarity index 100% rename from Resources/Private/Templates/Redirect/Suggest.html rename to Resources/Private/Templates/Suggest/Suggest.html diff --git a/ext_localconf.php b/ext_localconf.php index a035862..a0bda33 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -13,11 +13,31 @@ function () { 'Ipandlanguageredirect', 'Pi1', [ - \In2code\Ipandlanguageredirect\Controller\RedirectController::class => 'redirect,suggest' + \In2code\Ipandlanguageredirect\Controller\RedirectController::class => 'redirect' ], [ \In2code\Ipandlanguageredirect\Controller\RedirectController::class => 'redirect' ] ); + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'Ipandlanguageredirect', + 'Suggest', + [ + \In2code\Ipandlanguageredirect\Controller\SuggestController::class => 'suggest' + ], + [ + \In2code\Ipandlanguageredirect\Controller\SuggestController::class => 'suggest' + ] + ); + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'Ipandlanguageredirect', + 'Test', + [ + \In2code\Ipandlanguageredirect\Controller\TestController::class => 'test' + ], + [ + \In2code\Ipandlanguageredirect\Controller\TestController::class => 'test' + ] + ); } );