Neos\FluidAdaptor\ViewHelpers\Link\ExternalViewHelper::render PHP Method

render() public method

public render ( string $uri, string $defaultScheme = 'http' ) : string
$uri string the URI that will be put in the href attribute of the rendered link tag
$defaultScheme string scheme the href attribute will be prefixed with if specified $uri does not contain a scheme already
return string Rendered link
    public function render($uri, $defaultScheme = 'http')
    {
        $scheme = parse_url($uri, PHP_URL_SCHEME);
        if ($scheme === null && $defaultScheme !== '') {
            $uri = $defaultScheme . '://' . $uri;
        }
        $this->tag->addAttribute('href', $uri);
        $this->tag->setContent($this->renderChildren());
        $this->tag->forceClosingTag(true);
        return $this->tag->render();
    }