40 if ($value ==
"checked" || $value ===
"" || is_bool($value)) {
55 if ($value ===
true) {
58 if ($value ===
false) {
63 return parent::withValue($value);
72 if ($this->getName() === null) {
73 throw new \LogicException(
"Can only collect if input has a name.");
76 $value = $post_input->
getOr($this->getName(),
"");
78 $clone->content = $this->applyOperationsTo($value);
79 if ($clone->content->isError()) {
80 return $clone->withError(
"" . $clone->content->error());
83 $clone = $clone->withGroupInput($post_input);
getOr($name, $default)
Get a named value from the data and fallback to default if that name does not exist.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
Describes how Input-Elements want to interact with posted data.