ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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
7// TODO: This might cache the created factories.
8class Factory implements \ILIAS\UI\Factory
9{
13 public function counter()
14 {
15 return new Component\Counter\Factory();
16 }
17
21 public function glyph()
22 {
23 return new Component\Glyph\Factory();
24 }
25
29 public function button()
30 {
31 return new Component\Button\Factory();
32 }
33
37 public function card($title, \ILIAS\UI\Component\Image\Image $image = null)
38 {
39 return new Component\Card\Card($title, $image);
40 }
41
45 public function deck(array $cards)
46 {
47 return new Component\Deck\Deck($cards, Component\Deck\Deck::SIZE_S);
48 }
49
53 public function listing()
54 {
55 return new Component\Listing\Factory();
56 }
57
61 public function image()
62 {
63 return new Component\Image\Factory();
64 }
65
69 public function legacy($content)
70 {
71 return new Component\Legacy\Legacy($content);
72 }
73
77 public function panel()
78 {
79 return new Component\Panel\Factory();
80 }
81}
An exception for terminatinating execution or to throw for unit testing.
legacy($content)
description: purpose: > This component is used to wrap an existing ILIAS UI element into a UI compone...
Definition: Factory.php:69
panel()
description: purpose: > Panels are used to group titled content. composition: > Panels consist of a h...
Definition: Factory.php:77
deck(array $cards)
description: purpose: > Decks are used to display multiple Cards in a grid. They should be used if a ...
Definition: Factory.php:45
glyph()
description: purpose: > Glyphs map a generally known concept or symbol to a specific concept in ILIAS...
Definition: Factory.php:21
counter()
description: purpose: > Counter inform users about the quantity of items indicated by a glyph....
Definition: Factory.php:13
listing()
description: purpose: > Listings are used to structure itemised textual information....
Definition: Factory.php:53
card($title, \ILIAS\UI\Component\Image\Image $image=null)
Definition: Factory.php:37
button()
description: purpose: > Buttons trigger interactions that change the system’s status....
Definition: Factory.php:29
image()
description: purpose: The Image component is used to display images of various sources....
Definition: Factory.php:61
A component is the most general form of an entity in the UI.
Definition: Component.php:13
This is how the factory for UI elements looks.
Definition: Factory.php:15
Interface Card \UI\Component\Card.