ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 $button_factory;
24
29
33 protected $image_factory;
34
38 protected $panel_factory;
39
43 protected $modal_factory;
44
49
54
59
63 protected $link_factory;
64
69
73 protected $item_factory;
74
79
83 protected $chart_factory;
84
88 protected $input_factory;
89
93 protected $table_factory;
94
99
103 protected $card_factory;
104
108 protected $menu_factory;
109
114
119
123 protected $tree_factory;
124
129
134
135 public function __construct(
136 C\Counter\Factory $counter_factory,
138 C\Listing\Factory $listing_factory,
142 C\Dropzone\Factory $dropzone_factory,
143 C\Popover\Factory $popover_factory,
144 C\Divider\Factory $divider_factory,
146 C\Dropdown\Factory $dropdown_factory,
148 C\ViewControl\Factory $viewcontrol_factory,
152 C\MessageBox\Factory $messagebox_factory,
155 C\MainControls\Factory $maincontrols_factory,
160 ) {
161 $this->counter_factory = $counter_factory;
162 $this->button_factory = $button_factory;
163 $this->listing_factory = $listing_factory;
164 $this->image_factory = $image_factory;
165 $this->panel_factory = $panel_factory;
166 $this->modal_factory = $modal_factory;
167 $this->dropzone_factory = $dropzone_factory;
168 $this->popover_factory = $popover_factory;
169 $this->divider_factory = $divider_factory;
170 $this->link_factory = $link_factory;
171 $this->dropdown_factory = $dropdown_factory;
172 $this->item_factory = $item_factory;
173 $this->viewcontrol_factory = $viewcontrol_factory;
174 $this->chart_factory = $chart_factory;
175 $this->input_factory = $input_factory;
176 $this->table_factory = $table_factory;
177 $this->messagebox_factory = $messagebox_factory;
178 $this->card_factory = $card_factory;
179 $this->layout_factory = $layout_factory;
180 $this->maincontrols_factory = $maincontrols_factory;
181 $this->tree_factory = $tree_factory;
182 $this->menu_factory = $menu_factory;
183 $this->symbol_factory = $symbol_factory;
184 $this->legacy_factory = $legacy_factory;
185 }
186
190 public function counter()
191 {
193 }
194
198 public function button()
199 {
201 }
202
206 public function card()
207 {
208 return $this->card_factory;
209 }
210
214 public function deck(array $cards)
215 {
216 return new Component\Deck\Deck($cards, Component\Deck\Deck::SIZE_S);
217 }
218
222 public function listing()
223 {
225 }
226
230 public function image()
231 {
233 }
234
238 public function legacy($content)
239 {
240 return $this->legacy_factory->legacy($content);
241 }
242
246 public function panel()
247 {
249 }
250
254 public function modal()
255 {
257 }
258
262 public function dropzone()
263 {
265 }
266
270 public function popover()
271 {
273 }
274
278 public function divider()
279 {
281 }
282
286 public function link()
287 {
288 return $this->link_factory;
289 }
290
294 public function dropdown()
295 {
297 }
298
302 public function item()
303 {
304 return $this->item_factory;
305 }
306
307
311 public function viewControl()
312 {
314 }
315
319 public function breadcrumbs(array $crumbs)
320 {
321 return new Component\Breadcrumbs\Breadcrumbs($crumbs);
322 }
323
327 public function chart()
328 {
330 }
331
335 public function input()
336 {
338 }
339
343 public function table()
344 {
346 }
347
351 public function messageBox()
352 {
354 }
355
359 public function layout() : C\Layout\Factory
360 {
362 }
363
367 public function mainControls() : C\MainControls\Factory
368 {
370 }
371
375 public function tree()
376 {
377 return $this->tree_factory;
378 }
379
383 public function menu() : C\Menu\Factory
384 {
385 return $this->menu_factory;
386 }
387
391 public function symbol() : C\Symbol\Factory
392 {
394 }
395}
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:278
legacy($content)
description: purpose: > This component is used to wrap an existing ILIAS UI element into a UI compone...
Definition: Factory.php:238
menu()
description: purpose: > Menus let the user choose from several (navigational) options....
Definition: Factory.php:383
dropzone()
description: purpose: > Dropzones are containers used to drop either files or other HTML elements....
Definition: Factory.php:262
item()
description: purpose: > An item displays a unique entity within the system. It shows information abou...
Definition: Factory.php:302
panel()
description: purpose: > Panels are used to group titled content. composition: > Panels consist of a h...
Definition: Factory.php:246
tree()
description: purpose: > Trees present hierarchically structured data. rivals: Drilldown: > A Drilldow...
Definition: Factory.php:375
deck(array $cards)
description: purpose: > Decks are used to display multiple Cards in a grid. They should be used if a ...
Definition: Factory.php:214
chart()
description: purpose: > Charts are used to graphically represent data in various forms such as maps,...
Definition: Factory.php:327
breadcrumbs(array $crumbs)
description: purpose: > Breadcrumbs is a supplemental navigation scheme. It eases the user's navigati...
Definition: Factory.php:319
mainControls()
description: purpose: > Main Controls are components that are always usable, depending only on overal...
Definition: Factory.php:367
table()
description: purpose: > Tables present a set of uniformly structured data. \ILIAS\UI\Component\Table\...
Definition: Factory.php:343
popover()
description: purpose: > Popovers can be used when space is scarce i.e. within List GUI items,...
Definition: Factory.php:270
input()
description: purpose: > In opposite to components with a purely receptive or at most navigational cha...
Definition: Factory.php:335
modal()
description: purpose: The Modal forces users to focus on the task at hand. composition: > A Modal is ...
Definition: Factory.php:254
link()
description: purpose: > Links are used navigate to other resources or views of the system by clicking...
Definition: Factory.php:286
counter()
description: purpose: > Counter inform users about the quantity of items indicated by a glyph....
Definition: Factory.php:190
card()
description: purpose: > A card is a flexible content container for small chunks of structured data....
Definition: Factory.php:206
viewControl()
description: purpose: > View Controls switch between different visualisation of data....
Definition: Factory.php:311
listing()
description: purpose: > Listings are used to structure itemised textual information....
Definition: Factory.php:222
dropdown()
description: purpose: > Dropdowns reveal a list of interactions that change the system’s status or na...
Definition: Factory.php:294
symbol()
description: purpose: > Symbols are graphical representations of concepts or contexts quickly compreh...
Definition: Factory.php:391
__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\Legacy\Factory $legacy_factory)
Definition: Factory.php:135
button()
description: purpose: > Buttons trigger interactions that change the system’s or view's status....
Definition: Factory.php:198
image()
description: purpose: The Image component is used to display images of various sources....
Definition: Factory.php:230
layout()
description: purpose: > Layout components are compontents used for the overall construction of the us...
Definition: Factory.php:359
messageBox()
description: purpose: > Message Boxes inform the user about the state of the system or an ongoing use...
Definition: Factory.php:351
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:18