ILIAS
trunk Revision v11.0_alpha-1769-g99a433fe2dc
|
This describes commonalities between all inputs. More...
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... | |
![]() | |
getCanonicalName () | |
Get the canonical name of the component. More... | |
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.
ILIAS\UI\Component\Input\Input::getValue | ( | ) |
Get the value that is displayed in the input client side.
Implemented in ILIAS\UI\Implementation\Component\Input\Field\HasDynamicInputsBase, ILIAS\UI\Implementation\Component\Input\Field\SwitchableGroup, and ILIAS\UI\Implementation\Component\Input\Field\OptionalGroup.
Referenced by ILIAS\UI\Implementation\Component\Input\Field\Renderer\applyValue().
ILIAS\UI\Component\Input\Input::withAdditionalTransformation | ( | Transformation | $trafo | ) |
Apply a transformation to the content of the input.
Referenced by ILIAS\MetaData\Editor\Full\Services\Inputs\InputFactory\addNotEmptyConstraintIfNeeded(), ilStudyProgrammeTypeGUI\buildForm(), ILIAS\MetaData\Editor\Full\Services\Inputs\InputFactory\flattenOutput(), ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\NonNegIntFactory\rawInput(), and ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\DurationFactory\rawInput().
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'.
string | $dedicated_name |
ILIAS\UI\Component\Input\Input::withValue | ( | $value | ) |
Get an input like this with another value displayed on the client side.
mixed |
InvalidArgumentException | if value does not fit client side input |
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().