ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Factory.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2016 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
6
7use \ILIAS\UI\Component as C;
9
10// TODO: This might cache the created factories.
12
13class Factory implements \ILIAS\UI\Factory
14{
19
23 protected $glyph_factory;
24
28 protected $button_factory;
29
34
38 protected $image_factory;
39
43 protected $panel_factory;
44
48 protected $modal_factory;
49
54
59
64
68 protected $link_factory;
69
74
78 protected $item_factory;
79
83 protected $icon_factory;
84
89
93 protected $chart_factory;
94
98 protected $input_factory;
99
103 protected $table_factory;
104
108 protected $card_factory;
109
114
115 public function __construct(
116 C\Counter\Factory $counter_factory,
119 C\Listing\Factory $listing_factory,
123 C\Dropzone\Factory $dropzone_factory,
124 C\Popover\Factory $popover_factory,
125 C\Divider\Factory $divider_factory,
127 C\Dropdown\Factory $dropdown_factory,
130 C\ViewControl\Factory $viewcontrol_factory,
134 C\MessageBox\Factory $messagebox_factory,
136 ) {
137 $this->counter_factory = $counter_factory;
138 $this->glyph_factory = $glyph_factory;
139 $this->button_factory = $button_factory;
140 $this->listing_factory = $listing_factory;
141 $this->image_factory = $image_factory;
142 $this->panel_factory = $panel_factory;
143 $this->modal_factory = $modal_factory;
144 $this->dropzone_factory = $dropzone_factory;
145 $this->popover_factory = $popover_factory;
146 $this->divider_factory = $divider_factory;
147 $this->link_factory = $link_factory;
148 $this->dropdown_factory = $dropdown_factory;
149 $this->item_factory = $item_factory;
150 $this->icon_factory = $icon_factory;
151 $this->viewcontrol_factory = $viewcontrol_factory;
152 $this->chart_factory = $chart_factory;
153 $this->input_factory = $input_factory;
154 $this->table_factory = $table_factory;
155 $this->messagebox_factory = $messagebox_factory;
156 $this->card_factory = $card_factory;
157 }
158
162 public function counter()
163 {
165 }
166
170 public function glyph()
171 {
173 }
174
178 public function button()
179 {
181 }
182
186 public function card()
187 {
188 return $this->card_factory;
189 }
190
194 public function deck(array $cards)
195 {
196 return new Component\Deck\Deck($cards, Component\Deck\Deck::SIZE_S);
197 }
198
202 public function listing()
203 {
205 }
206
210 public function image()
211 {
213 }
214
218 public function legacy($content)
219 {
220 return new Component\Legacy\Legacy($content);
221 }
222
226 public function panel()
227 {
229 }
230
234 public function modal()
235 {
237 }
238
242 public function dropzone()
243 {
245 }
246
250 public function popover()
251 {
253 }
254
258 public function divider()
259 {
261 }
262
266 public function link()
267 {
268 return $this->link_factory;
269 }
270
274 public function dropdown()
275 {
277 }
278
282 public function item()
283 {
284 return $this->item_factory;
285 }
286
290 public function icon()
291 {
292 return $this->icon_factory;
293 }
294
298 public function viewControl()
299 {
301 }
302
306 public function breadcrumbs(array $crumbs)
307 {
308 return new Component\Breadcrumbs\Breadcrumbs($crumbs);
309 }
310
314 public function chart()
315 {
317 }
318
322 public function input()
323 {
325 }
326
330 public function table()
331 {
333 }
334
338 public function messageBox()
339 {
341 }
342}
An exception for terminatinating execution or to throw for unit testing.
divider()
description: purpose: > A divider marks a thematic change in a sequence of other components....
Definition: Factory.php:258
legacy($content)
description: purpose: > This component is used to wrap an existing ILIAS UI element into a UI compone...
Definition: Factory.php:218
dropzone()
description: purpose: > Dropzones are containers used to drop either files or other HTML elements....
Definition: Factory.php:242
item()
description: purpose: > An item displays a unique entity within the system. It shows information abou...
Definition: Factory.php:282
panel()
description: purpose: > Panels are used to group titled content. composition: > Panels consist of a h...
Definition: Factory.php:226
deck(array $cards)
description: purpose: > Decks are used to display multiple Cards in a grid. They should be used if a ...
Definition: Factory.php:194
chart()
description: purpose: > Charts are used to graphically represent data in various forms such as maps,...
Definition: Factory.php:314
breadcrumbs(array $crumbs)
description: purpose: > Breadcrumbs is a supplemental navigation scheme. It eases the user's navigati...
Definition: Factory.php:306
glyph()
description: purpose: > Glyphs map a generally known concept or symbol to a specific concept in ILIAS...
Definition: Factory.php:170
table()
description: purpose: > Tables present a set of uniformly structured data. \ILIAS\UI\Component\Table\...
Definition: Factory.php:330
popover()
description: purpose: > Popovers can be used when space is scarce i.e. within List GUI items,...
Definition: Factory.php:250
input()
description: purpose: > In opposite to components with a purely receptive or at most navigational cha...
Definition: Factory.php:322
modal()
description: purpose: The Modal forces users to focus on the task at hand. composition: > A Modal is ...
Definition: Factory.php:234
link()
description: purpose: > Links are used navigate to other resources or views of the system....
Definition: Factory.php:266
__construct(C\Counter\Factory $counter_factory, C\Glyph\Factory $glyph_factory, C\Button\Factory $button_factory, C\Listing\Factory $listing_factory, C\Image\Factory $image_factory, C\Panel\Factory $panel_factory, C\Modal\Factory $modal_factory, C\Dropzone\Factory $dropzone_factory, C\Popover\Factory $popover_factory, C\Divider\Factory $divider_factory, C\Link\Factory $link_factory, C\Dropdown\Factory $dropdown_factory, C\Item\Factory $item_factory, C\Icon\Factory $icon_factory, C\ViewControl\Factory $viewcontrol_factory, C\Chart\Factory $chart_factory, C\Input\Factory $input_factory, C\Table\Factory $table_factory, C\MessageBox\Factory $messagebox_factory, C\Card\Factory $card_factory)
Definition: Factory.php:115
icon()
description: purpose: > Icons are quickly comprehensible and recognizable graphics....
Definition: Factory.php:290
counter()
description: purpose: > Counter inform users about the quantity of items indicated by a glyph....
Definition: Factory.php:162
card()
description: purpose: > A card is a flexible content container for small chunks of structured data....
Definition: Factory.php:186
viewControl()
description: purpose: > View Controls switch between different visualisation of data....
Definition: Factory.php:298
listing()
description: purpose: > Listings are used to structure itemised textual information....
Definition: Factory.php:202
dropdown()
description: purpose: > Dropdowns reveal a list of interactions that change the system’s status or na...
Definition: Factory.php:274
button()
description: purpose: > Buttons trigger interactions that change the system’s or view's status....
Definition: Factory.php:178
image()
description: purpose: The Image component is used to display images of various sources....
Definition: Factory.php:210
messageBox()
description: purpose: > Message Boxes inform the user about the state of the system or an ongoing use...
Definition: Factory.php:338
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...
A component is the most general form of an entity in the UI.
Definition: Component.php:14
This is how the factory for UI elements looks.
Definition: Factory.php:16