ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Standard.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29use ILIAS\UI\Component\Button\Standard as ButtonStandard;
30use ILIAS\UI\Component\Link\Standard as LinkStandard;
31
32class Standard extends Item implements C\Item\Standard
33{
34 protected ?Color $color = null;
35
39 protected $lead = null;
41 protected ?Audio $audio = null;
42 protected ButtonStandard|LinkStandard|null $main_action = null;
43
47 public function withColor(Color $color): C\Item\Standard
48 {
49 $clone = clone $this;
50 $clone->color = $color;
51 return $clone;
52 }
53
57 public function getColor(): ?Color
58 {
59 return $this->color;
60 }
61
65 public function withLeadImage(Image $image): C\Item\Standard
66 {
67 $clone = clone $this;
68 $clone->lead = $image;
69 return $clone;
70 }
71
75 public function withLeadAvatar(Avatar $avatar): C\Item\Standard
76 {
77 $clone = clone $this;
78 $clone->lead = $avatar;
79 return $clone;
80 }
81
85 public function withAudioPlayer(Audio $audio): C\Item\Standard
86 {
87 $clone = clone $this;
88 $clone->audio = $audio;
89 return $clone;
90 }
91
92 public function getAudioPlayer(): ?Audio
93 {
94 return $this->audio;
95 }
96
100 public function withLeadIcon(Icon $icon): C\Item\Standard
101 {
102 $clone = clone $this;
103 $clone->lead = $icon;
104 return $clone;
105 }
106
110 public function withLeadText(string $text): C\Item\Standard
111 {
112 $clone = clone $this;
113 $clone->lead = $text;
114 return $clone;
115 }
116
120 public function withNoLead(): C\Item\Standard
121 {
122 $clone = clone $this;
123 $clone->lead = null;
124 return $clone;
125 }
126
130 public function getLead()
131 {
132 return $this->lead;
133 }
134
139 {
140 $clone = clone $this;
141 $clone->chart = $chart;
142 return $clone;
143 }
144
146 {
147 return $this->chart;
148 }
149
153 public function withActions(C\Dropdown\Standard $actions): C\Item\Standard
154 {
155 $clone = clone $this;
156 $clone->actions = $actions;
157 return $clone;
158 }
159
163 public function getActions(): ?C\Dropdown\Standard
164 {
165 return $this->actions;
166 }
167
168 public function withMainAction(ButtonStandard|LinkStandard $button): C\Item\Standard
169 {
170 $clone = clone $this;
171 $clone->main_action = $button;
172 return $clone;
173 }
174
175 public function getMainAction(): ButtonStandard|LinkStandard|null
176 {
177 return $this->main_action;
178 }
179}
Color expresses a certain color by giving the mixing ratio in the RGB color space.
Definition: Color.php:30
withActions(C\Dropdown\Standard $actions)
Definition: Standard.php:153
withProgress(C\Chart\ProgressMeter\ProgressMeter $chart)
Definition: Standard.php:138
withMainAction(ButtonStandard|LinkStandard $button)
Definition: Standard.php:168
C Chart ProgressMeter ProgressMeter $chart
Definition: Standard.php:40
ButtonStandard LinkStandard null $main_action
Definition: Standard.php:42
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