ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Standard.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use ILIAS\UI\Component as C;
31 
32 class Standard extends Item implements C\Item\Standard
33 {
34  protected ?Color $color = null;
35 
39  protected $lead = null;
40  protected ?C\Chart\ProgressMeter\ProgressMeter $chart = null;
41  protected ?Audio $audio = 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 
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 
169  {
170  $clone = clone $this;
171  $clone->main_action = $button;
172  return $clone;
173  }
174 
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:29
C Chart ProgressMeter ProgressMeter $chart
Definition: Standard.php:40
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:34
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This describes how a letter or a picture avatar could be modified during construction of UI...
Definition: Avatar.php:28
Common interface to all items.
Definition: Item.php:31
withProgress(C\Chart\ProgressMeter\ProgressMeter $chart)
Definition: Standard.php:138
ButtonStandard LinkStandard null $main_action
Definition: Standard.php:42
withMainAction(ButtonStandard|LinkStandard $button)
Definition: Standard.php:168
withActions(C\Dropdown\Standard $actions)
Definition: Standard.php:153