FluidTYPO3\Vhs\ViewHelpers\Media\GravatarViewHelper::render PHP Method

render() public method

Render method
public render ( ) : string
return string
    public function render()
    {
        $email = $this->arguments['email'];
        $size = $this->checkArgument('size');
        $imageSet = $this->checkArgument('imageSet');
        $maximumRating = $this->checkArgument('maximumRating');
        $secure = (bool) $this->arguments['secure'];
        $url = true === $secure ? self::GRAVATAR_SECURE_BASEURL : self::GRAVATAR_BASEURL;
        $url .= md5(strtolower(trim($email)));
        $query = http_build_query(array('s' => $size, 'd' => $imageSet, 'r' => $maximumRating));
        $url .= false === empty($query) ? '?' . $query : '';
        $this->tag->addAttribute('src', $url);
        $this->tag->forceClosingTag(true);
        return $this->tag->render();
    }