ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Input.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2017 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
6
10
30interface Input extends Component
31{
32
38 public function getLabel();
39
40
48 public function withLabel($label);
49
50
56 public function getByline();
57
58
66 public function withByline($byline);
67
68
74 public function isRequired();
75
76
84 public function withRequired($is_required);
85
86
92 public function getValue();
93
94
104 public function withValue($value);
105
106
112 public function getError();
113
114
122 public function withError($error);
123
124
133
134
142 public function withAdditionalConstraint(Constraint $constraint);
143}
An exception for terminatinating execution or to throw for unit testing.
A transformation is a function from one datatype to another.
A component is the most general form of an entity in the UI.
Definition: Component.php:14
This describes commonalities between all inputs.
Definition: Input.php:31
withByline($byline)
Get an input like this, but with an additional/replaced label.
withAdditionalConstraint(Constraint $constraint)
Apply a constraint to the content of the input.
getValue()
Get the value that is displayed in the input client side.
getByline()
Get the byline of the input.
withValue($value)
Get an input like this with another value displayed on the client side.
getLabel()
Get the label of the input.
withAdditionalTransformation(Transformation $trafo)
Apply a transformation to the content of the input.
withLabel($label)
Get an input like this, but with a replaced label.
isRequired()
Is this field required?
withRequired($is_required)
Get an input like this, but set the field to be required (or not).
getError()
The error of the input as used in HTML.
withError($error)
Get an input like this one, with a different error.
A constraint encodes some resrtictions on values.
Definition: Constraint.php:15