ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\Component\Input\Input Interface Reference

This describes commonalities between all inputs. More...

+ Inheritance diagram for ILIAS\UI\Component\Input\Input:
+ Collaboration diagram for ILIAS\UI\Component\Input\Input:

Public Member Functions

 getValue ()
 Get the value that is displayed in the input client side. More...
 
 withValue ($value)
 Get an input like this with another value displayed on the client side. More...
 
 withAdditionalTransformation (Transformation $trafo)
 Apply a transformation to the content of the input. More...
 
 withDedicatedName (string $dedicated_name)
 Sets an optional dedicated name for this input which is used in the NAME attribute of the rendered input (instead of the auto-generated 'input_x'). More...
 
- Public Member Functions inherited from ILIAS\UI\Component\Component
 getCanonicalName ()
 Get the canonical name of the component. More...
 

Detailed Description

This describes commonalities between all inputs.

Inputs are different from other UI components. They bundle two things: the displaying of the component (as the other components do as well) and the processing of data as it is received from the client.

There are two types of input fields, individual and groups. They share this same basic input interface.

When the term "value" is used, it references the content of the input as it is shown to the client. The term "content" on the other hand means the value that is contained in the input after the client sends it to the server.

The latter, i.e. the content, can be validated via constraints and transformed into other types of data. This means, that e.g. the value of an input could be some id, while the content could be some object referenced by that id.

Definition at line 46 of file Input.php.

Member Function Documentation

◆ getValue()

ILIAS\UI\Component\Input\Input::getValue ( )

◆ withAdditionalTransformation()

◆ withDedicatedName()

ILIAS\UI\Component\Input\Input::withDedicatedName ( string  $dedicated_name)

Sets an optional dedicated name for this input which is used in the NAME attribute of the rendered input (instead of the auto-generated 'input_x').

If the same dedicated name is used more than once, a counter will be added to the name.

The dedicated name is inherited by all child inputs (e.g. for groups or sections) and added to their name in a path-like format. Example: All children of an input named 'user' will be named 'user/input_x' or - if they have a dedicated name of their own - will be named 'user/address'. This path will be extended for each level of input that has a dedicated name, e.g. 'user/address/street'.

Parameters
string$dedicated_name
Returns
$this

◆ withValue()

ILIAS\UI\Component\Input\Input::withValue (   $value)

Get an input like this with another value displayed on the client side.

Parameters
mixed
Exceptions
InvalidArgumentExceptionif value does not fit client side input
Returns
static

Implemented in ILIAS\UI\Implementation\Component\Input\Field\File, ILIAS\UI\Implementation\Component\Input\Field\HasDynamicInputsBase, and ILIAS\UI\Implementation\Component\Input\Field\OptionalGroup.

Referenced by ilObjQuestionPoolGUI\buildInputEditingType(), ilObjTestGUI\buildInputEditingType(), ILIAS\Test\Settings\ScoreReporting\SettingsGamification\toForm(), and ilIndividualAssessmentUserGrading\toFormInput().

+ Here is the caller graph for this function:

The documentation for this interface was generated from the following file: