43 if ($value === null) {
51 return Input::withRequired($is_required);
56 return $this->is_required;
65 if ($value === null) {
67 $clone->value = $value;
68 $clone->null_value_was_explicitly_set =
true;
74 $clone = parent::withValue($value);
75 $clone->null_value_was_explicitly_set =
false;
84 if ($this->null_value_was_explicitly_set) {
87 return parent::getValue();
96 if ($this->getName() === null) {
97 throw new \LogicException(
"Can only collect if input has a name.");
101 $value = $post_input->
getOr($this->getName(), null);
102 if ($value === null) {
105 $temp = $clone->is_required;
106 $clone->is_required =
true;
107 $clone->content = $clone->applyOperationsTo(null);
108 $clone->is_required = $temp;
112 return parent::withInput($post_input);
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.