19declare(strict_types=1);
54 return ($value ===
null || array_key_exists($value, $this->
getOptions()));
62 if ($this->requirement_constraint !==
null) {
63 return $this->requirement_constraint;
77 $clone->options[$value] = $label;
78 if (!is_null($byline)) {
79 $clone->bylines[$value] = $byline;
95 if (!array_key_exists($value, $this->bylines)) {
98 return $this->bylines[$value];
106 if ($this->getName() ===
null) {
107 throw new LogicException(
"Can only collect if input has a name.");
110 $value = $input->
getOr($this->getName(),
null);
117 if ($clone->content->isError()) {
118 return $clone->withError(
"" . $clone->content->error());
123 if ($clone->getError()) {
124 $clone->content = $clone->data_factory->error($clone->getError());
135 return fn(
$id) =>
"$('#$id').on('input', function(event) {
136 il.UI.input.onFieldUpdate(event, '$id', $('#$id input:checked').val());
138 il.UI.input.onFieldUpdate(event, '$id', $('#$id input:checked').val());";
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
A constraint encodes some resrtictions on values.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.