‪TYPO3CMS  9.5
TYPO3\CMS\Backend\ViewHelpers\AvatarViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Backend\ViewHelpers\AvatarViewHelper:

Public Member Functions

 initializeArguments ()
 

Static Public Member Functions

static string renderStatic (array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 

Protected Attributes

bool $escapeOutput = false
 

Detailed Description

Render the avatar markup, including the :html:<img> tag, for a given backend user.

Examples

Default

::

<be:avatar backendUser="{user.uid}" size="32" showIcon="true" />

Output::

If the given backend user hasn't added a custom avatar yet, a default one is used.

Inline notation

::

{be:avatar(backendUser: user.id, size: 32, showIcon: 'true')}

Output::

Definition at line 62 of file AvatarViewHelper.php.

Member Function Documentation

◆ initializeArguments()

TYPO3\CMS\Backend\ViewHelpers\AvatarViewHelper::initializeArguments ( )

Initializes the arguments

Definition at line 74 of file AvatarViewHelper.php.

◆ renderStatic()

static string TYPO3\CMS\Backend\ViewHelpers\AvatarViewHelper::renderStatic ( array  $arguments,
\Closure  $renderChildrenClosure,
RenderingContextInterface  $renderingContext 
)
static

Resolve user avatar from a given backend user id.

Parameters
array$arguments
\Closure$renderChildrenClosure
RenderingContextInterface$renderingContext
Returns
‪string

Definition at line 89 of file AvatarViewHelper.php.

References $GLOBALS.

Member Data Documentation

◆ $escapeOutput

bool TYPO3\CMS\Backend\ViewHelpers\AvatarViewHelper::$escapeOutput = false
protected

As this ViewHelper renders HTML, the output must not be escaped.

Definition at line 69 of file AvatarViewHelper.php.