TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Backend\Avatar\Avatar Class Reference

Public Member Functions

 __construct ()
 
 render (array $backendUser=null, $size=32, $showIcon=false)
 
 getImgTag (array $backendUser=null, $size=32)
 
 getImage (array $backendUser, $size)
 

Protected Member Functions

 validateSortAndInitiateAvatarProviders ()
 
 getBackendUser ()
 

Protected Attributes

 $avatarProviders = []
 

Detailed Description

Avatar renderer class

Definition at line 26 of file Avatar.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Backend\Avatar\Avatar::__construct ( )

Member Function Documentation

◆ getBackendUser()

TYPO3\CMS\Backend\Backend\Avatar\Avatar::getBackendUser ( )
protected

Returns the current BE user.

Returns

Definition at line 154 of file Avatar.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Backend\Avatar\Avatar\getImgTag(), and TYPO3\CMS\Backend\Backend\Avatar\Avatar\render().

◆ getImage()

TYPO3\CMS\Backend\Backend\Avatar\Avatar::getImage ( array  $backendUser,
  $size 
)

Get Image from first provider that returns one

Parameters
array$backendUserbe_users record
int$size
Returns
Image|NULL

Definition at line 106 of file Avatar.php.

Referenced by TYPO3\CMS\Backend\Backend\Avatar\Avatar\getImgTag().

◆ getImgTag()

TYPO3\CMS\Backend\Backend\Avatar\Avatar::getImgTag ( array  $backendUser = null,
  $size = 32 
)

◆ render()

TYPO3\CMS\Backend\Backend\Avatar\Avatar::render ( array  $backendUser = null,
  $size = 32,
  $showIcon = false 
)

Render avatar tag

Parameters
array$backendUserbe_users record
int$sizewidth and height of the image
bool$showIconshow the record icon
Returns
string

Definition at line 51 of file Avatar.php.

References TYPO3\CMS\Backend\Backend\Avatar\Avatar\getBackendUser(), TYPO3\CMS\Backend\Backend\Avatar\Avatar\getImgTag(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

◆ validateSortAndInitiateAvatarProviders()

TYPO3\CMS\Backend\Backend\Avatar\Avatar::validateSortAndInitiateAvatarProviders ( )
protected

Validates the registered avatar providers

Returns
void
Exceptions

Definition at line 123 of file Avatar.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Backend\Backend\Avatar\Avatar\__construct().

Member Data Documentation

◆ $avatarProviders

TYPO3\CMS\Backend\Backend\Avatar\Avatar::$avatarProviders = []
protected

Definition at line 33 of file Avatar.php.