ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 
4 
5 use ILIAS\UI\Component as C;
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 }