ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
PresentationRow.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\UI\Implementation\Component\ComponentHelper;
32
34{
35 use ComponentHelper;
37
41 private $action = null;
42
46 private ?string $headline = null;
47 private ?string $subheadline = null;
48 private array $important_fields = [];
49 private Block $content;
50 private ?string $further_fields_headline = null;
51 private array $further_fields = [];
52 private array $data;
53 private ?Symbol $symbol = null;
55
56 public function __construct(
58 protected string $table_id
59 ) {
60 $this->signal_generator = $signal_generator;
61 $this->initSignals();
62 }
63
68 {
69 $clone = clone $this;
70 $clone->initSignals();
71 return $clone;
72 }
73
77 protected function initSignals(): void
78 {
79 $this->show_signal = $this->signal_generator->create();
80 $this->close_signal = $this->signal_generator->create();
81 $this->toggle_signal = $this->signal_generator->create();
82 }
83
87 public function getShowSignal(): Signal
88 {
89 return $this->show_signal;
90 }
91
95 public function getCloseSignal(): Signal
96 {
98 }
99
100
104 public function getToggleSignal(): Signal
105 {
107 }
108
109
114 {
115 $this->checkStringArg("string", $headline);
116 $clone = clone $this;
117 $clone->headline = $headline;
118 return $clone;
119 }
120
124 public function getHeadline(): ?string
125 {
126 return $this->headline;
127 }
128
133 {
134 $this->checkStringArg("string", $subheadline);
135 $clone = clone $this;
136 $clone->subheadline = $subheadline;
137 return $clone;
138 }
139
143 public function getSubheadline(): ?string
144 {
145 return $this->subheadline;
146 }
147
152 {
153 $clone = clone $this;
154 $clone->important_fields = $fields;
155 return $clone;
156 }
157
161 public function getImportantFields(): array
162 {
164 }
165
166
171 {
172 $clone = clone $this;
173 $clone->content = $content;
174 return $clone;
175 }
176
177 public function getContent(): Block
178 {
179 return $this->content;
180 }
181
186 {
187 $this->checkStringArg("string", $headline);
188 $clone = clone $this;
189 $clone->further_fields_headline = $headline;
190 return $clone;
191 }
192
197 {
199 }
200
205 {
206 $clone = clone $this;
207 $clone->further_fields = $fields;
208 return $clone;
209 }
210
214 public function getFurtherFields(): array
215 {
217 }
218
219
224 {
225 $check =
226 is_null($action)
227 || $action instanceof Button
228 || $action instanceof Dropdown;
229
230 $expected =
231 " NULL or " .
232 " \ILIAS\UI\Component\Button\Button or " .
233 " \ILIAS\UI\Component\ropdown\Dropdown";
234
235 $this->checkArg("action", $check, $this->wrongTypeMessage($expected, $action));
236 $clone = clone $this;
237 $clone->action = $action;
238 return $clone;
239 }
240
244 public function getAction()
245 {
246 return $this->action;
247 }
248
249 public function withLeadingSymbol(Symbol $symbol): self
250 {
251 $clone = clone $this;
252 $clone->symbol = $symbol;
253 return $clone;
254 }
255
256 public function getLeadingSymbol(): ?Symbol
257 {
258 return $this->symbol;
259 }
260
261 public function getTableId(): string
262 {
263 return $this->table_id;
264 }
265}
$check
Definition: buildRTE.php:81
initSignals()
Set the signals for this component.
__construct(SignalGeneratorInterface $signal_generator, protected string $table_id)
array $fields
clone(int $target_parent_obj_id)
readonly SignalGenerator $signal_generator
This describes commonalities between standard and primary buttons.
Definition: Button.php:34
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:35
This is the interface for Blocks.
Definition: Block.php:28
initSignals()
Init the default signals plus extra signals like Replace.
This describes a symbol.
Definition: Symbol.php:30
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.