ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
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 Mon Sep 1 2025 20:01:43 for ILIAS by
1.8.13 (using
Doxyfile
)