ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
Factory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
30 interface Factory
31 {
69  public function text(string $label, ?string $byline = null): Text;
70 
95  public function numeric(string $label, ?string $byline = null): Numeric;
96 
118  public function group(array $inputs, string $label = '', ?string $byline = null): Group;
119 
146  public function optionalGroup(array $inputs, string $label, ?string $byline = null): OptionalGroup;
147 
174  public function switchableGroup(array $inputs, string $label, ?string $byline = null): SwitchableGroup;
175 
215  public function section(array $inputs, string $label, ?string $byline = null): Section;
216 
245  public function checkbox(string $label, ?string $byline = null): Checkbox;
246 
247 
304  public function tag(string $label, array $tags, ?string $byline = null): Tag;
305 
352  public function password(string $label, ?string $byline = null): Password;
353 
387  public function select(string $label, array $options, ?string $byline = null): Select;
388 
431  public function textarea(string $label, ?string $byline = null): Textarea;
432 
476  public function radio(string $label, ?string $byline = null): Radio;
477 
518  public function multiSelect(string $label, array $options, ?string $byline = null): MultiSelect;
519 
550  public function dateTime(string $label, ?string $byline = null): DateTime;
551 
577  public function duration(string $label, ?string $byline = null): Duration;
578 
632  public function file(
634  string $label,
635  ?string $byline = null,
636  ?FormInput $metadata_input = null
637  ): File;
638 
701  public function image(
702  UploadHandler $upload_handler,
703  ImagePurpose $image_purpose,
704  string $label,
705  ?string $byline = null,
706  FormInput $metadata_input = null,
707  ): Image;
708 
736  public function url(string $label, ?string $byline = null): Url;
737 
764  public function link(string $label, ?string $byline = null): Link;
765 
787  public function hidden(): Hidden;
788 
812  public function colorSelect(string $label, ?string $byline = null): ColorSelect;
813 
854  public function markdown(MarkdownRenderer $md_renderer, string $label, ?string $byline = null): Markdown;
855 
895  public function rating(string $label, ?string $byline = null): Rating;
896 
952  public function treeSelect(
953  NodeRetrieval $node_retrieval,
954  string $label,
955  ?string $byline = null,
956  ): TreeSelect;
957 
1020  public function treeMultiSelect(
1021  NodeRetrieval $node_retrieval,
1022  string $label,
1023  ?string $byline = null,
1024  ): TreeMultiSelect;
1025 
1044  public function node(): Node\Factory;
1045 }
This is what a factory for input fields looks like.
Definition: Factory.php:30
treeSelect(NodeRetrieval $node_retrieval, string $label, ?string $byline=null,)
description: purpose: > The tree select input is designed to guide and assist users in selecting a s...
This describes numeric inputs.
Definition: Numeric.php:28
This describes the duration input.
Definition: Duration.php:30
file(UploadHandler $handler, string $label, ?string $byline=null, ?FormInput $metadata_input=null)
description: purpose: > The File Field can be used to upload one or multiple files from the user dev...
node()
description: purpose: > A Node is used by the Tree (Multi) Select Field to visualise different types...
This is what a Rating Input looks like.
Definition: Rating.php:28
duration(string $label, ?string $byline=null)
description: purpose: > A Duration Input is used to enter a time span.
text(string $label, ?string $byline=null)
description: purpose: > A text-field is intended for entering short single-line texts.
select(string $label, array $options, ?string $byline=null)
description: purpose: > A select is used to allow users to pick among a number of options...
checkbox(string $label, ?string $byline=null)
description: purpose: > A checkbox is used to govern a state, action, or set / not to set a value...
ImagePurpose
This enum provides options to categorise the purpose of an image, which will be used to determine whe...
This describes optional group inputs.
This describes select field.
Definition: Select.php:28
dateTime(string $label, ?string $byline=null)
description: purpose: > A DateTime Input is used to enter dates and/or times.
tag(string $label, array $tags, ?string $byline=null)
description: purpose: > A Tag Input is used to choose a subset amount of tags (techn.
This is what a radio-input looks like.
Definition: Radio.php:28
This describes checkbox inputs.
Definition: Checkbox.php:28
switchableGroup(array $inputs, string $label, ?string $byline=null)
description: purpose: > A switchable group is a collection of groups that makes the user decide whic...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Checkbox.php:21
password(string $label, ?string $byline=null)
description: purpose: > A password-field is intended for entering passwords.
textarea(string $label, ?string $byline=null)
description: purpose: > A textarea is intended for entering multi-line texts.
group(array $inputs, string $label='', ?string $byline=null)
description: purpose: > Input groups are an unlabeled collection of inputs.
numeric(string $label, ?string $byline=null)
description: purpose: > A numeric field is used to retrieve integer values from the user...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
markdown(MarkdownRenderer $md_renderer, string $label, ?string $byline=null)
description: purpose: > Markdown inputs are used when formatted text should be submitted by using ma...
rating(string $label, ?string $byline=null)
description: purpose: > The Rating Input allows to express an individual assessment or evaluation of...
This describes switchable group inputs.
This describes a multi-select input.
Definition: MultiSelect.php:28
image(UploadHandler $upload_handler, ImagePurpose $image_purpose, string $label, ?string $byline=null, FormInput $metadata_input=null,)
description: purpose: > The Image Field can be used to upload one or multiple images from the user d...
colorSelect(string $label, ?string $byline=null)
description: purpose: > A Color Picker Input is used to select a color value.
This describes text inputs.
Definition: Text.php:28
hidden()
description: purpose: > Hidden inputs are used for transmitting persistent data which the user shoul...
This describes Textarea inputs.
Definition: Textarea.php:28
section(array $inputs, string $label, ?string $byline=null)
description: purpose: > Sections are used to visually group inputs to a common context.
This describes password inputs.
Definition: Password.php:28
radio(string $label, ?string $byline=null)
description: purpose: > A Radio Input is used to depict a choice of options excluding each other...
treeMultiSelect(NodeRetrieval $node_retrieval, string $label, ?string $byline=null,)
description: purpose: > The multi tree select input is designed to guide and assist users in selecti...
$handler
Definition: oai.php:29
link(string $label, ?string $byline=null)
description: purpose: > Link Inputs are used to enter URLs in conjunction with a label...
url(string $label, ?string $byline=null)
description: purpose: > The URL Input is intended for entering a single URL.
multiSelect(string $label, array $options, ?string $byline=null)
description: purpose: > A Multi Select is used to allow users to pick several options from a list...
This describes inputs that can be used in forms.
Definition: FormInput.php:32
This describes a URL input.
Definition: Url.php:28
This describes file field.
Definition: File.php:28
optionalGroup(array $inputs, string $label, ?string $byline=null)
description: purpose: > An optional group is a collection of input where the user needs to make a co...