ILIAS  release_8 Revision v8.24
Standard.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
29
30class Standard extends Item implements C\Item\Standard
31{
32 protected ?Color $color = null;
33
37 protected $lead = null;
39 protected ?Audio $audio = null;
40
44 public function withColor(Color $color): C\Item\Standard
45 {
46 $clone = clone $this;
47 $clone->color = $color;
48 return $clone;
49 }
50
54 public function getColor(): ?Color
55 {
56 return $this->color;
57 }
58
62 public function withLeadImage(Image $image): C\Item\Standard
63 {
64 $clone = clone $this;
65 $clone->lead = $image;
66 return $clone;
67 }
68
72 public function withLeadAvatar(Avatar $avatar): C\Item\Standard
73 {
74 $clone = clone $this;
75 $clone->lead = $avatar;
76 return $clone;
77 }
78
82 public function withAudioPlayer(Audio $audio): C\Item\Standard
83 {
84 $clone = clone $this;
85 $clone->audio = $audio;
86 return $clone;
87 }
88
89 public function getAudioPlayer(): ?Audio
90 {
91 return $this->audio;
92 }
93
97 public function withLeadIcon(Icon $icon): C\Item\Standard
98 {
99 $clone = clone $this;
100 $clone->lead = $icon;
101 return $clone;
102 }
103
107 public function withLeadText(string $text): C\Item\Standard
108 {
109 $clone = clone $this;
110 $clone->lead = $text;
111 return $clone;
112 }
113
117 public function withNoLead(): C\Item\Standard
118 {
119 $clone = clone $this;
120 $clone->lead = null;
121 return $clone;
122 }
123
127 public function getLead()
128 {
129 return $this->lead;
130 }
131
135 public function withProgress(C\Chart\ProgressMeter\ProgressMeter $chart): C\Item\Standard
136 {
137 $clone = clone $this;
138 $clone->chart = $chart;
139 return $clone;
140 }
141
142 public function getProgress(): ?C\Chart\ProgressMeter\ProgressMeter
143 {
144 return $this->chart;
145 }
146
150 public function withActions(C\Dropdown\Standard $actions): C\Item\Standard
151 {
152 $clone = clone $this;
153 $clone->actions = $actions;
154 return $clone;
155 }
156
160 public function getActions(): ?C\Dropdown\Standard
161 {
162 return $this->actions;
163 }
164}
Color expresses a certain color by giving the mixing ratio in the RGB color space.
Definition: Color.php:16
withActions(C\Dropdown\Standard $actions)
Definition: Standard.php:150
withProgress(C\Chart\ProgressMeter\ProgressMeter $chart)
Definition: Standard.php:135
C Chart ProgressMeter ProgressMeter $chart
Definition: Standard.php:38
This describes a standard button.
Definition: Standard.php:27
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:35
Common interface to all items.
Definition: Item.php:32
This describes how a letter or a picture avatar could be modified during construction of UI.
Definition: Avatar.php:29
This describes how an icon could be modified during construction of UI.
Definition: Icon.php:29
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: Factory.php:21