ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Avatar.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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 describes a symbol.
Definition: Symbol.php:30
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.