ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilUserAvatarFactory.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
3
10{
14 protected $dic;
15
20 public function __construct(\ILIAS\DI\Container $dic)
21 {
22 $this->dic = $dic;
23 }
24
29 public function avatar($size)
30 {
31 if ((int) $this->dic->settings()->get('letter_avatars')) {
32 return $this->letter();
33 }
34
35 return $this->file($size);
36 }
37
41 public function letter()
42 {
43 return new ilUserAvatarLetter();
44 }
45
50 public function file($size)
51 {
52 return new ilUserAvatarFile($size);
53 }
54}
$size
Definition: RandomTest.php:84
An exception for terminatinating execution or to throw for unit testing.
Class ilUserAvatarFactory.
__construct(\ILIAS\DI\Container $dic)
ilUserAvatarFactory constructor.
Class ilUserAvatarFile.
Class ilUserAvatarLetter.
Class HTTPServicesTest.
Class BaseForm.