ILIAS  release_8 Revision v8.24
Factory.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
24
25// TODO: This might cache the created factories.
27
28class Factory implements \ILIAS\UI\Factory
29{
31 protected C\Button\Factory $button_factory;
32 protected C\Listing\Factory $listing_factory;
33 protected C\Image\Factory $image_factory;
34 protected C\Panel\Factory $panel_factory;
35 protected C\Modal\Factory $modal_factory;
36 protected C\Dropzone\Factory $dropzone_factory;
38 protected C\Divider\Factory $divider_factory;
39 protected C\Link\Factory $link_factory;
40 protected C\Dropdown\Factory $dropdown_factory;
41 protected C\Item\Factory $item_factory;
42 protected C\ViewControl\Factory $viewcontrol_factory;
45 protected C\Table\Factory $table_factory;
48 protected C\Menu\Factory $menu_factory;
49 protected C\Layout\Factory $layout_factory;
50 protected C\MainControls\Factory $maincontrols_factory;
51 protected C\Tree\Factory $tree_factory;
52 protected C\Symbol\Factory $symbol_factory;
53 protected C\Toast\Factory $toast_factory;
54 protected C\Legacy\Factory $legacy_factory;
55
56 public function __construct(
69 C\ViewControl\Factory $viewcontrol_factory,
73 C\MessageBox\Factory $messagebox_factory,
76 C\MainControls\Factory $maincontrols_factory,
82 ) {
83 $this->counter_factory = $counter_factory;
84 $this->button_factory = $button_factory;
85 $this->listing_factory = $listing_factory;
86 $this->image_factory = $image_factory;
87 $this->panel_factory = $panel_factory;
88 $this->modal_factory = $modal_factory;
89 $this->dropzone_factory = $dropzone_factory;
90 $this->popover_factory = $popover_factory;
91 $this->divider_factory = $divider_factory;
92 $this->link_factory = $link_factory;
93 $this->dropdown_factory = $dropdown_factory;
94 $this->item_factory = $item_factory;
95 $this->viewcontrol_factory = $viewcontrol_factory;
96 $this->chart_factory = $chart_factory;
97 $this->input_factory = $input_factory;
98 $this->table_factory = $table_factory;
99 $this->messagebox_factory = $messagebox_factory;
100 $this->card_factory = $card_factory;
101 $this->layout_factory = $layout_factory;
102 $this->maincontrols_factory = $maincontrols_factory;
103 $this->tree_factory = $tree_factory;
104 $this->menu_factory = $menu_factory;
105 $this->symbol_factory = $symbol_factory;
106 $this->toast_factory = $toast_factory;
107 $this->legacy_factory = $legacy_factory;
108 }
109
113 public function counter(): C\Counter\Factory
114 {
116 }
117
121 public function button(): C\Button\Factory
122 {
124 }
125
129 public function card(): C\Card\Factory
130 {
131 return $this->card_factory;
132 }
133
137 public function deck(array $cards): C\Deck\Deck
138 {
139 return new Component\Deck\Deck($cards, C\Deck\Deck::SIZE_S);
140 }
141
145 public function listing(): C\Listing\Factory
146 {
148 }
149
153 public function image(): C\Image\Factory
154 {
156 }
157
158 public function player(): C\Player\Factory
159 {
160 return new Component\Player\Factory();
161 }
162
166 public function legacy(string $content): C\Legacy\Legacy
167 {
168 return $this->legacy_factory->legacy($content);
169 }
170
174 public function panel(): C\Panel\Factory
175 {
177 }
178
182 public function modal(): C\Modal\Factory
183 {
185 }
186
190 public function dropzone(): C\Dropzone\Factory
191 {
193 }
194
198 public function popover(): C\Popover\Factory
199 {
201 }
202
206 public function divider(): C\Divider\Factory
207 {
209 }
210
214 public function link(): C\Link\Factory
215 {
216 return $this->link_factory;
217 }
218
222 public function dropdown(): C\Dropdown\Factory
223 {
225 }
226
230 public function item(): C\Item\Factory
231 {
232 return $this->item_factory;
233 }
234
235
239 public function viewControl(): C\ViewControl\Factory
240 {
242 }
243
247 public function breadcrumbs(array $crumbs): C\Breadcrumbs\Breadcrumbs
248 {
249 return new Component\Breadcrumbs\Breadcrumbs($crumbs);
250 }
251
255 public function chart(): C\Chart\Factory
256 {
258 }
259
263 public function input(): C\Input\Factory
264 {
266 }
267
271 public function table(): C\Table\Factory
272 {
274 }
275
279 public function messageBox(): C\MessageBox\Factory
280 {
282 }
283
287 public function layout(): C\Layout\Factory
288 {
290 }
291
295 public function mainControls(): C\MainControls\Factory
296 {
298 }
299
303 public function tree(): C\Tree\Factory
304 {
305 return $this->tree_factory;
306 }
307
311 public function menu(): C\Menu\Factory
312 {
313 return $this->menu_factory;
314 }
315
319 public function symbol(): C\Symbol\Factory
320 {
322 }
323
324 public function toast(): C\Toast\Factory
325 {
327 }
328}
divider()
description: purpose: > A divider marks a thematic change in a sequence of other components....
Definition: Factory.php:206
menu()
description: purpose: > Menus let the user choose from several (navigational) options....
Definition: Factory.php:311
dropzone()
description: purpose: > Dropzones are containers used to drop either files or other HTML elements....
Definition: Factory.php:190
item()
description: purpose: > An item displays a unique entity within the system. It shows information abou...
Definition: Factory.php:230
C Menu Factory $menu_factory
Definition: Factory.php:48
C Item Factory $item_factory
Definition: Factory.php:41
C Divider Factory $divider_factory
Definition: Factory.php:38
panel()
description: purpose: > Panels are used to group titled content. composition: > Panels consist of a h...
Definition: Factory.php:174
tree()
description: purpose: > Trees present hierarchically structured data. rivals: Drilldown: > A Drilldow...
Definition: Factory.php:303
deck(array $cards)
description: purpose: > Decks are used to display multiple Cards in a grid. They should be used if a ...
Definition: Factory.php:137
C Chart Factory $chart_factory
Definition: Factory.php:43
__construct(C\Counter\Factory $counter_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\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, C\Layout\Factory $layout_factory, C\MainControls\Factory $maincontrols_factory, C\Tree\Factory $tree_factory, C\Menu\Factory $menu_factory, C\Symbol\Factory $symbol_factory, C\Toast\Factory $toast_factory, C\Legacy\Factory $legacy_factory)
Definition: Factory.php:56
C Modal Factory $modal_factory
Definition: Factory.php:35
chart()
description: purpose: > Charts are used to graphically represent data in various forms such as maps,...
Definition: Factory.php:255
C Listing Factory $listing_factory
Definition: Factory.php:32
C Card Factory $card_factory
Definition: Factory.php:47
C Tree Factory $tree_factory
Definition: Factory.php:51
C Layout Factory $layout_factory
Definition: Factory.php:49
breadcrumbs(array $crumbs)
description: purpose: > Breadcrumbs is a supplemental navigation scheme. It eases the user's navigati...
Definition: Factory.php:247
C MainControls Factory $maincontrols_factory
Definition: Factory.php:50
mainControls()
description: purpose: > Main Controls are components that are always usable, depending only on overal...
Definition: Factory.php:295
table()
description: purpose: > Tables present a set of uniformly structured data. \ILIAS\UI\Component\Table\...
Definition: Factory.php:271
popover()
description: purpose: > Popovers can be used when space is scarce i.e. within List GUI items,...
Definition: Factory.php:198
C MessageBox Factory $messagebox_factory
Definition: Factory.php:46
input()
description: purpose: > In opposite to components with a purely receptive or at most navigational cha...
Definition: Factory.php:263
C Image Factory $image_factory
Definition: Factory.php:33
modal()
description: purpose: The Modal forces users to focus on the task at hand. composition: > A Modal is ...
Definition: Factory.php:182
link()
description: purpose: > Links are used navigate to other resources or views of the system by clicking...
Definition: Factory.php:214
C Link Factory $link_factory
Definition: Factory.php:39
C Dropzone Factory $dropzone_factory
Definition: Factory.php:36
C Popover Factory $popover_factory
Definition: Factory.php:37
legacy(string $content)
description: purpose: > This component is used to wrap an existing ILIAS UI element into a UI compone...
Definition: Factory.php:166
C Input Factory $input_factory
Definition: Factory.php:44
C Symbol Factory $symbol_factory
Definition: Factory.php:52
C Dropdown Factory $dropdown_factory
Definition: Factory.php:40
counter()
description: purpose: > Counter inform users about the quantity of items indicated by a glyph....
Definition: Factory.php:113
card()
description: purpose: > A card is a flexible content container for small chunks of structured data....
Definition: Factory.php:129
viewControl()
description: purpose: > View Controls switch between different visualisation of data....
Definition: Factory.php:239
listing()
description: purpose: > Listings are used to structure itemised textual information....
Definition: Factory.php:145
dropdown()
description: purpose: > Dropdowns reveal a list of interactions that change the system’s status or na...
Definition: Factory.php:222
C Panel Factory $panel_factory
Definition: Factory.php:34
C Counter Factory $counter_factory
Definition: Factory.php:30
C Button Factory $button_factory
Definition: Factory.php:31
symbol()
description: purpose: > Symbols are graphical representations of concepts or contexts quickly compreh...
Definition: Factory.php:319
C Table Factory $table_factory
Definition: Factory.php:45
button()
description: purpose: > Buttons trigger interactions that change the system’s or view's status....
Definition: Factory.php:121
image()
description: purpose: The Image component is used to display images of various sources....
Definition: Factory.php:153
layout()
description: purpose: > Layout components are components used for the overall construction of the use...
Definition: Factory.php:287
C ViewControl Factory $viewcontrol_factory
Definition: Factory.php:42
C Toast Factory $toast_factory
Definition: Factory.php:53
C Legacy Factory $legacy_factory
Definition: Factory.php:54
messageBox()
description: purpose: > Message Boxes inform the user about the state of the system or an ongoing use...
Definition: Factory.php:279
This is how the factory for UI elements looks.
Definition: Factory.php:38
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21
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...