ILIAS  release_8 Revision v8.24
Avatar.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
24use ILIAS\UI\Implementation\Component\ComponentHelper;
26
27abstract class Avatar implements C\Symbol\Avatar\Avatar
28{
29 use ComponentHelper;
31
32 private string $username;
33 protected string $label = '';
34
35 public function __construct(string $username)
36 {
37 $this->username = $username;
38 }
39
40 public function getUsername(): string
41 {
42 return $this->username;
43 }
44
45 public function withLabel(string $text): C\Symbol\Avatar\Avatar
46 {
47 $clone = clone $this;
48 $clone->label = $text;
49 return $clone;
50 }
51
52 public function getLabel(): string
53 {
54 return $this->label;
55 }
56}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Avatar.php:21
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.