19 declare(strict_types=1);
46 $this->setAdditionalTransformation($refinery->custom()->transformation(fn ($v) => strip_tags($v)));
55 $this->
refinery->string()->hasMaxLength($max_length)
75 if (!is_string($value)) {
79 if ($this->max_length !== null &&
80 strlen($value) > $this->max_length) {
92 if ($this->requirement_constraint !== null) {
93 return $this->requirement_constraint;
96 return $this->
refinery->string()->hasMinLength(1);
104 return fn (
$id) =>
"$('#$id').on('input', function(event) { 105 il.UI.input.onFieldUpdate(event, '$id', $('#$id').val()); 107 il.UI.input.onFieldUpdate(event, '$id', $('#$id').val());";
withMaxLength(int $max_length)
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A constraint encodes some resrtictions on values.
This implements the text input.
isClientSideValueOk($value)
__construct(Container $dic, ilPlugin $plugin)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getUpdateOnLoadCode()
Get update code.This method has to return JS code that calls il.UI.filter.onFieldUpdate(event, '$id', string_value);initially "onload" andon every input change. It must pass a readable string representation of its value in parameter 'string_value'.
__construct(DataFactory $data_factory, \ILIAS\Refinery\Factory $refinery, string $label, ?string $byline)
getConstraintForRequirement()
Refinery Factory $refinery