ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
DefInput Class Reference
+ Inheritance diagram for DefInput:
+ Collaboration diagram for DefInput:

Public Member Functions

 getUpdateOnLoadCode ()
 Get update code. More...
 
- Public Member Functions inherited from ILIAS\UI\Implementation\Component\Input\Field\Input
 __construct (DataFactory $data_factory, Factory $refinery, $label, $byline)
 Input constructor. More...
 
 getLabel ()
 Get the label of the input.
Returns
string
More...
 
 withLabel ($label)
 Get an input like this, but with a replaced label.
Parameters
string$label
Returns
Input
More...
 
 getByline ()
 Get the byline of the input.
Returns
string|null
More...
 
 withByline ($byline)
 Get an input like this, but with an additional/replaced label.
Parameters
string | null$byline
Returns
Input
More...
 
 isRequired ()
 Is this field required?
Returns
bool
More...
 
 withRequired ($is_required)
 Get an input like this, but set the field to be required (or not).
Parameters
bool$is_required
Returns
Input
More...
 
 isDisabled ()
 Is this input disabled?
Returns
bool
More...
 
 withDisabled ($is_disabled)
 Get an input like this, but set it to a disabled state.
Parameters
bool$is_disabled
Returns
Input
More...
 
 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...
 
 getError ()
 The error of the input as used in HTML. More...
 
 withError ($error)
 Get an input like this one, with a different error. More...
 
 withAdditionalTransformation (Transformation $trafo)
 Apply a transformation to the current or future content. More...
 
 getName ()
 The name of the input as used in HTML.
Returns
string
More...
 
 withNameFrom (NameSource $source)
 Get an input like this one, with a different name.
Parameters
NameSource$source
Returns
Input
More...
 
 withInput (InputData $input)
 Collects the input, applies trafos on the input and returns a new input reflecting the data that was putted in. More...
 
 getContent ()
 Get the current content of the input.
Returns
Result
More...
 
 withOnUpdate (Signal $signal)
 Trigger a signal of another component on update.
Parameters
Signal$signalA signal of another component
Returns
$this
More...
 
 appendOnUpdate (Signal $signal)
 Get a component like this, triggering a signal of another component on update.In contrast to withOnUpdate, the signal is appended to existing signals for the on update event.
Parameters
Signal$signal
Returns
$this
More...
 
 getName ()
 The name of the input as used in HTML. More...
 
 withNameFrom (NameSource $source)
 Get an input like this one, with a different name. More...
 
 withInput (InputData $input)
 Get an input like this with input from post data. More...
 
 getContent ()
 Get the current content of the input. More...
 
 getLabel ()
 Get the label of the input. More...
 
 withLabel ($label)
 Get an input like this, but with a replaced label. More...
 
 getByline ()
 Get the byline of the input. More...
 
 withByline ($byline)
 Get an input like this, but with an additional/replaced label. More...
 
 isRequired ()
 Is this field required? More...
 
 withRequired ($is_required)
 Get an input like this, but set the field to be required (or not). More...
 
 isDisabled ()
 Is this input disabled? More...
 
 withDisabled ($is_disabled)
 Get an input like this, but set it to a disabled state. More...
 
 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...
 
 getError ()
 The error of the input as used in HTML. More...
 
 withError ($error)
 Get an input like this one, with a different error. More...
 
 withAdditionalTransformation (Transformation $trafo)
 Apply a transformation to the content of the input. More...
 
 getUpdateOnLoadCode ()
 Get update code. More...
 
- Public Member Functions inherited from ILIAS\UI\Component\Component
 getCanonicalName ()
 Get the canonical name of the component. More...
 
- Public Member Functions inherited from ILIAS\UI\Component\JavaScriptBindable
 withOnLoadCode (\Closure $binder)
 
 withAdditionalOnLoadCode (\Closure $binder)
 Add some onload-code to the component instead of replacing the existing one. More...
 
 getOnLoadCode ()
 Get the currently bound on load code. More...
 
 withOnUpdate (Signal $signal)
 Trigger a signal of another component on update. More...
 
 appendOnUpdate (Signal $signal)
 Get a component like this, triggering a signal of another component on update. More...
 
- Public Member Functions inherited from ILIAS\UI\Component\Triggerer
 withResetTriggeredSignals ()
 Get a component like this but reset any triggered signals of other components. More...
 
 getTriggeredSignals ()
 Get all triggered signals of this component. More...
 

Data Fields

 $value_ok = true
 
 $requirement_constraint = null
 

Protected Member Functions

 isClientSideValueOk ($value)
 Check if the value is good to be displayed client side. More...
 
 getConstraintForRequirement ()
 This may return a constraint that will be checked first if the field is required. More...
 
- Protected Member Functions inherited from ILIAS\UI\Implementation\Component\Input\Field\Input
 getConstraintForRequirement ()
 This may return a constraint that will be checked first if the field is required. More...
 
 isClientSideValueOk ($value)
 Check if the value is good to be displayed client side. More...
 
 setAdditionalTransformation (Transformation $trafo)
 Apply a transformation to the current or future content. More...
 
 applyOperationsTo ($res)
 Applies the operations in this instance to the value. More...
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\UI\Implementation\Component\Input\Field\Input
 $data_factory
 
 $refinery
 
 $label
 
 $byline
 
 $is_required = false
 
 $is_disabled = false
 
 $value = null
 
 $error = null
 
 $content = null
 

Detailed Description

Definition at line 14 of file InputTest.php.

Member Function Documentation

◆ getConstraintForRequirement()

DefInput::getConstraintForRequirement ( )
protected

This may return a constraint that will be checked first if the field is required.

Returns
Constraint|null

Reimplemented from ILIAS\UI\Implementation\Component\Input\Field\Input.

Definition at line 28 of file InputTest.php.

29 {
31 }
$requirement_constraint
Definition: InputTest.php:25

References $requirement_constraint.

◆ getUpdateOnLoadCode()

DefInput::getUpdateOnLoadCode ( )

Get update code.

This method has to return JS code that calls il.UI.filter.onFieldUpdate(event, '$id', string_value);

  • initially "onload" and
  • on every input change. It must pass a readable string representation of its value in parameter 'string_value'.
Parameters
\Closure$binder
Returns
string

Implements ILIAS\UI\Component\Input\Field\Input.

Definition at line 34 of file InputTest.php.

34 : \Closure
35 {
36 return function () {
37 };
38 }

◆ isClientSideValueOk()

DefInput::isClientSideValueOk (   $value)
protected

Check if the value is good to be displayed client side.

Parameters
mixed$value
Returns
bool

Reimplemented from ILIAS\UI\Implementation\Component\Input\Field\Input.

Definition at line 19 of file InputTest.php.

19 : bool
20 {
21 return $this->value_ok;
22 }

References $value_ok.

Field Documentation

◆ $requirement_constraint

DefInput::$requirement_constraint = null

Definition at line 25 of file InputTest.php.

Referenced by getConstraintForRequirement().

◆ $value_ok

DefInput::$value_ok = true

Definition at line 16 of file InputTest.php.

Referenced by isClientSideValueOk().


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