ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
s
t
w
+
Functions
_
a
b
c
f
g
h
i
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
Letter.php
Go to the documentation of this file.
1
<?php declare(strict_types=1);
2
3
namespace
ILIAS\UI\Implementation\Component\Symbol\Avatar
;
4
5
use
ILIAS\UI\Component
as
C
;
6
use
ILIAS\UI\Implementation\Component\Symbol\Avatar\Avatar
;
7
8
class
Letter
extends
Avatar
implements C\Symbol\Avatar\Letter
9
{
10
public
function
getAbbreviation
() : string
11
{
12
return
(substr($this->
getUsername
(), 0, 2));
13
}
14
15
public
function
getBackgroundColorVariant
() : int
16
{
17
return
(crc32($this->
getUsername
()) % 26) + 1;
18
}
19
}
ILIAS\UI\Implementation\Component\Symbol\Avatar\Letter\getAbbreviation
getAbbreviation()
Definition:
Letter.php:10
ILIAS\UI\Component
ILIAS\UI\Component\Symbol\Avatar\Avatar\getUsername
getUsername()
ILIAS\UI\Implementation\Component\Symbol\Avatar\Letter\getBackgroundColorVariant
getBackgroundColorVariant()
Definition:
Letter.php:15
ILIAS\UI\Component\Symbol\Avatar\Letter
Definition:
Letter.php:5
ILIAS\UI\Implementation\Component\Symbol\Avatar\Avatar
Definition:
Avatar.php:10
Avatar
ILIAS\UI\Implementation\Component\Symbol\Avatar
Definition:
Avatar.php:4
src
UI
Implementation
Component
Symbol
Avatar
Letter.php
Generated on Sun Apr 13 2025 20:01:36 for ILIAS by
1.8.13 (using
Doxyfile
)