Stud.IP  5.4
LicenseAvatar Class Reference
Inheritance diagram for LicenseAvatar:
Avatar

Public Member Functions

 getImageTag ($size=Avatar::MEDIUM, $opt=[])
 
 getDefaultTitle ()
 
- Public Member Functions inherited from Avatar
 getAvatarDirectoryUrl ()
 
 getAvatarDirectoryPath ()
 
 getDefaultAvatarDirectoryUrl ()
 
 getDefaultAvatarDirectoryPath ()
 
 getCustomAvatarUrl ($size)
 
 getCustomAvatarPath ($size)
 
 getFilename ($size)
 
 getURL ($size)
 
 isNobody ()
 
 customizedFileExists ()
 
 is_customized ()
 
 getImageTag ($size=self::MEDIUM, $opt=[])
 
 createFromUpload ($userfile)
 
 createFrom ($filename)
 
 reset ()
 
 getDefaultTitle ()
 

Static Public Member Functions

static getDimension ($size)
 
- Static Public Member Functions inherited from Avatar
static getAvatar ($id)
 
static getNobody ()
 
static getDimension ($size)
 
static error_handler ($errno, $errstr, $errfile, $errline)
 

Data Fields

const AVATAR_TYPE = 'licenses'
 
- Data Fields inherited from Avatar
const AVATAR_TYPE = 'user'
 
const EXTENSION = 'webp'
 
const IMAGE_QUALITY = 90
 
const ORIGINAL = 'original'
 
const NORMAL = 'normal'
 
const MEDIUM = 'medium'
 
const SMALL = 'small'
 
const MAX_FILE_SIZE = 10485760
 

Protected Member Functions

 getCssClass ($size)
 
 checkAvatarVisibility ()
 
- Protected Member Functions inherited from Avatar
 __construct ($user_id, $username=null)
 
 getCssClass ($size)
 
 checkAvatarVisibility ()
 
 sanitizeOrientation ($filename)
 

Protected Attributes

const CREATE_CHUNKED_FOLDERS = false
 
- Protected Attributes inherited from Avatar
const CREATE_CHUNKED_FOLDERS = true
 
const NOBODY = 'nobody'
 
 $user_id
 
 $username
 

Detailed Description

This class represents the image-picture of a license.

Member Function Documentation

◆ checkAvatarVisibility()

checkAvatarVisibility ( )
protected

Return if avatar is visible to the current user.

Returns
boolean: true if visible

◆ getCssClass()

getCssClass (   $size)
protected

Returns the CSS class to use for this avatar image.

Parameters
string$sizeone of the constants Avatar::(NORMAL|MEDIUM|SMALL)
Returns
string CSS class to use for the avatar

◆ getDefaultTitle()

getDefaultTitle ( )

Return the default title of the avatar.

Returns
string the default title

◆ getDimension()

static getDimension (   $size)
static

Return the dimension of a size

Parameters
string$sizethe dimension of a size
Returns
array a tupel of integers [width, height]

◆ getImageTag()

getImageTag (   $size = Avatar::MEDIUM,
  $opt = [] 
)

Field Documentation

◆ AVATAR_TYPE

const AVATAR_TYPE = 'licenses'

◆ CREATE_CHUNKED_FOLDERS

const CREATE_CHUNKED_FOLDERS = false
protected

The documentation for this class was generated from the following file: