ILIAS  release_8 Revision v8.24
DefInput Class Reference
+ Inheritance diagram for DefInput:
+ Collaboration diagram for DefInput:

Public Member Functions

 isClientSideValueOk ($value)
 
 getUpdateOnLoadCode ()
 Get update code. More...
 
- Public Member Functions inherited from ILIAS\UI\Implementation\Component\Input\Field\FormInput
 __construct (DataFactory $data_factory, Refinery $refinery, string $label, ?string $byline=null)
 
 withInput (InputData $input)
 @inheritDoc More...
 
 getLabel ()
 Get the label of the input. More...
 
 withLabel (string $label)
 Get an input like this, but with a replaced label.
Returns
static
More...
 
 getByline ()
 Get the byline of the input. More...
 
 withByline (string $byline)
 Get an input like this, but with an additional/replaced label.
Returns
static
More...
 
 isRequired ()
 Is this field required? More...
 
 withRequired (bool $is_required, ?Constraint $requirement_constraint=null)
 Get an input like this, but set the field to be required (or not).With the optional $required_constraint, you can REPLACE the default constraint that is checked if $is_required is true (see getConstraintForRequirement() on Input/Field implementations). A custom constraint SHOULD be explained in the byline of the input. More...
 
 isDisabled ()
 Is this input disabled? More...
 
 withDisabled (bool $is_disabled)
 Get an input like this, but set it to a disabled state.
Returns
static
More...
 
 withOnUpdate (Signal $signal)
 Trigger a signal of another component on update.
Parameters
Signal$signalA signal of another component
Returns
static
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.
Returns
static
More...
 
 getLabel ()
 Get the label of the input. More...
 
 withLabel (string $label)
 Get an input like this, but with a replaced label. More...
 
 getByline ()
 Get the byline of the input. More...
 
 withByline (string $byline)
 Get an input like this, but with an additional/replaced label. More...
 
 isRequired ()
 Is this field required? More...
 
 withRequired (bool $is_required, ?Constraint $requirement_constraint=null)
 Get an input like this, but set the field to be required (or not). More...
 
 isDisabled ()
 Is this input disabled? More...
 
 withDisabled (bool $is_disabled)
 Get an input like this, but set it to a disabled state. More...
 
 getUpdateOnLoadCode ()
 Get update code. More...
 
- Public Member Functions inherited from ILIAS\UI\Component\Input\Input
 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...
 
- 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...
 
- Public Member Functions inherited from ILIAS\UI\Implementation\Component\Input\InputInternal
 withNameFrom (NameSource $source)
 Get an input like this one, with a different name. More...
 
 getName ()
 The name of the input as used in HTML. More...
 
 withInput (InputData $input)
 Get an input like this with input from post data. More...
 
 getContent ()
 Get the current content of the input. More...
 
 withError (string $error)
 Get an input like this one, with a different error. More...
 
 getError ()
 The error of the input as used in HTML. More...
 

Data Fields

bool $value_ok = true
 
Constraint $requirement_constraint = null
 

Protected Member Functions

 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\FormInput
 getConstraintForRequirement ()
 This may return a constraint that will be checked first if the field is required. More...
 
 applyOperationsTo ($res)
 @inheritDoc More...
 
 getOperations ()
 @inheritDoc More...
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\UI\Implementation\Component\Input\Field\FormInput
bool $is_disabled = false
 
bool $is_required = false
 
Constraint $requirement_constraint = null
 
string $label
 
string $byline = null
 

Detailed Description

Definition at line 32 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.

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

Definition at line 42 of file InputTest.php.

42 : ?Constraint
43 {
45 }
Constraint $requirement_constraint
Definition: InputTest.php:35
A constraint encodes some resrtictions on values.
Definition: Constraint.php:32

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'.

Implements ILIAS\UI\Component\Input\Container\Form\FormInput.

Definition at line 47 of file InputTest.php.

47 : Closure
48 {
49 return function (): void {
50 };
51 }

◆ isClientSideValueOk()

DefInput::isClientSideValueOk (   $value)

Definition at line 37 of file InputTest.php.

37 : bool
38 {
39 return $this->value_ok;
40 }
bool $value_ok
Definition: InputTest.php:34

References $value_ok.

Field Documentation

◆ $requirement_constraint

Constraint DefInput::$requirement_constraint = null

Definition at line 35 of file InputTest.php.

Referenced by getConstraintForRequirement().

◆ $value_ok

bool DefInput::$value_ok = true

Definition at line 34 of file InputTest.php.

Referenced by isClientSideValueOk().


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