19 declare(strict_types=1);
54 return ($value ===
'' || array_key_exists($value, $this->
getOptions()));
62 if ($this->requirement_constraint !== null) {
63 return $this->requirement_constraint;
75 $clone->options[$value] = $label;
76 if (!is_null($byline)) {
77 $clone->bylines[$value] = $byline;
93 if (!array_key_exists($value, $this->bylines)) {
96 return $this->bylines[$value];
104 if ($this->getName() === null) {
105 throw new LogicException(
"Can only collect if input has a name.");
108 $value = $input->
getOr($this->getName(),
"");
116 if ($clone->content->isError()) {
117 return $clone->withError(
"" . $clone->content->error());
122 if ($clone->getError()) {
123 $clone->content = $clone->data_factory->error($clone->getError());
134 return fn (
$id) =>
"$('#$id').on('input', function(event) { 135 il.UI.input.onFieldUpdate(event, '$id', $('#$id input:checked').val()); 137 il.UI.input.onFieldUpdate(event, '$id', $('#$id input:checked').val());";
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
A constraint encodes some resrtictions on values.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins