37 return ($value ===
'' || array_key_exists($value, $this->
getOptions()));
54 $clone->options[$value] = $label;
55 if (!is_null($byline)) {
56 $clone->bylines[$value] = $byline;
66 return $this->options;
72 if (!array_key_exists($value, $this->bylines)) {
75 return $this->bylines[$value];
83 if ($this->getName() === null) {
84 throw new \LogicException(
"Can only collect if input has a name.");
87 $value = $post_input->
getOr($this->getName(),
"");
94 $clone->content = $this->applyOperationsTo($value);
95 if ($clone->content->isError()) {
96 return $clone->withError(
"" . $clone->content->error());
99 $clone->content = $this->applyOperationsTo($value);
101 if ($clone->getError()) {
102 $clone->content = $clone->data_factory->error($clone->getError());
113 return function ($id) {
114 $code =
"$('#$id').on('input', function(event) { 115 il.UI.input.onFieldUpdate(event, '$id', $('#$id input:checked').val()); 117 il.UI.input.onFieldUpdate(event, '$id', $('#$id input:checked').val());";
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.