17 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
18 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
19 use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
42 use CompileWithRenderStatic;
49 $this->registerArgument(
'email',
'string',
'The email address to be turned into a URI',
true);
59 public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
61 $email = $arguments[
'email'];
63 if (TYPO3_MODE ===
'FE') {
64 $emailParts =
$GLOBALS[
'TSFE']->cObj->getMailTo($email, $email);
65 return reset($emailParts);
67 return 'mailto:' . $email;