ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilUserAvatarFactory Class Reference

Class ilUserAvatarFactory. More...

+ Collaboration diagram for ilUserAvatarFactory:

Public Member Functions

 __construct (\ILIAS\DI\Container $dic)
 ilUserAvatarFactory constructor. More...
 
 avatar ($size)
 
 letter ()
 
 file ($size)
 

Protected Attributes

 $dic
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilUserAvatarFactory::__construct ( \ILIAS\DI\Container  $dic)

ilUserAvatarFactory constructor.

Parameters
\ILIAS\DI\Container$dic

Definition at line 20 of file class.ilUserAvatarFactory.php.

References $dic.

21  {
22  $this->dic = $dic;
23  }

Member Function Documentation

◆ avatar()

ilUserAvatarFactory::avatar (   $size)
Parameters
string$size
Returns
ilUserAvatar

Definition at line 29 of file class.ilUserAvatarFactory.php.

References $size, file(), and letter().

30  {
31  if ((int) $this->dic->settings()->get('letter_avatars')) {
32  return $this->letter();
33  }
34 
35  return $this->file($size);
36  }
$size
Definition: RandomTest.php:84
+ Here is the call graph for this function:

◆ file()

ilUserAvatarFactory::file (   $size)
Parameters
string$size
Returns
ilUserAvatarFile

Definition at line 50 of file class.ilUserAvatarFactory.php.

References $size.

Referenced by avatar().

51  {
52  return new ilUserAvatarFile($size);
53  }
$size
Definition: RandomTest.php:84
Class ilUserAvatarFile.
+ Here is the caller graph for this function:

◆ letter()

ilUserAvatarFactory::letter ( )
Returns
ilUserAvatarLetter

Definition at line 41 of file class.ilUserAvatarFactory.php.

Referenced by avatar().

42  {
43  return new ilUserAvatarLetter();
44  }
Class ilUserAvatarLetter.
+ Here is the caller graph for this function:

Field Documentation

◆ $dic

ilUserAvatarFactory::$dic
protected

Definition at line 14 of file class.ilUserAvatarFactory.php.

Referenced by __construct().


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