registerArgument('url', 'string', "An URL", true); } /** * -- This method is expected by Fluid -- * Renders the content as html * * @param array $arguments * @param Closure $renderChildrenClosure * @param RenderingContextInterface $renderingContext * @return string|null */ public static function renderStatic( array $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext ) { $url = $arguments['url']; return $url ? 'https://' . preg_replace("/(?:https?:\/\/)?(.*)/", "$1", $url) : null; } }