19declare(strict_types=1);
30use InvalidArgumentException;
44 if ($this->requirement_constraint !==
null) {
45 return $this->requirement_constraint;
56 return $value ===
"checked" || $value ===
"" || is_bool($value);
74 if ($this->getName() ===
null) {
75 throw new LogicException(
"Can only collect if input has a name.");
79 $value = $input->
getOr($this->getName(),
"");
80 $clone = $this->
withValue($value ===
"checked");
86 if ($clone->content->isError()) {
88 return $clone->withError(
"" . $clone->content->error());
131 return fn(
$id) =>
"$('#$id').on('input', function(event) {
132 il.UI.input.onFieldUpdate(event, '$id', $('#$id').prop('checked').toString());
134 il.UI.input.onFieldUpdate(event, '$id', $('#$id').prop('checked').toString());";
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
A constraint encodes some resrtictions on values.
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.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.