19declare(strict_types=1);
50 return ($value ===
null || array_key_exists($value, $this->
getOptions()));
58 if ($this->requirement_constraint !==
null) {
59 return $this->requirement_constraint;
63 fn($txt, $value) => $txt(
'required')
73 $clone->options[$value] = $label;
74 if (!is_null($byline)) {
75 $clone->bylines[$value] = $byline;
83 if (!array_key_exists($value, $this->bylines)) {
86 return $this->bylines[$value];
94 if ($this->getName() ===
null) {
95 throw new LogicException(
"Can only collect if input has a name.");
98 $value = $input->
getOr($this->getName(),
null);
105 if ($clone->content->isError()) {
106 return $clone->withError(
"" . $clone->content->error());
111 if ($clone->getError()) {
112 $clone->content = $clone->data_factory->error($clone->getError());
123 return fn(
$id) =>
"$('#$id').on('input', function(event) {
124 il.UI.input.onFieldUpdate(event, '$id', $('#$id input:checked').val());
126 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.