registerArgument('action', 'string', 'Target action'); $this->registerArgument('arguments', 'array', 'Arguments for the controller action, associative array'); } public static function renderStatic( array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext ): string { $result = ''; if ( $arguments['action'] !== null && $arguments['arguments'] !== null && isset($arguments['arguments']['user']) ) { if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() < 13) { $result = GeneralUtility::hmac($arguments['action'] . '::' . $arguments['arguments']['user']); } else { /** @var HashService $hashService */ $hashService = GeneralUtility::makeInstance(HashService::class); $result = $hashService->hmac($arguments['action'] . '::' . $arguments['arguments']['user'], ''); } } return $result; } }