19 declare(strict_types=1);
44 if ($this->requirement_constraint !== null) {
45 return $this->requirement_constraint;
56 if ($value ==
"checked" || $value ===
"" || is_bool($value)) {
69 $value = $value ??
false;
71 if (!is_bool($value)) {
73 "Unknown value type for checkbox: " . gettype($value)
86 if ($this->getName() === null) {
91 $value = $input->
getOr($this->getName(),
"");
92 $clone = $this->
withValue($value ===
"checked");
98 if ($clone->content->isError()) {
100 return $clone->withError(
"" . $clone->content->error());
143 return fn (
$id) =>
"$('#$id').on('input', function(event) { 144 il.UI.input.onFieldUpdate(event, '$id', $('#$id').prop('checked').toString()); 146 il.UI.input.onFieldUpdate(event, '$id', $('#$id').prop('checked').toString());";
appendTriggeredSignal(C\Signal $signal, string $event)
Append a triggered signal to other signals of the same event.
withTriggeredSignal(C\Signal $signal, string $event)
Add a triggered signal, replacing any other signals registered on the same event. ...
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