97 $this->data_factory = $data_factory;
98 $this->refinery = $refinery;
105 $this->operations = [];
126 $clone = clone $this;
138 return $this->byline;
148 $clone = clone $this;
160 return $this->is_required;
170 $clone = clone $this;
191 return $this->is_disabled;
201 $clone = clone $this;
231 $clone = clone $this;
268 $clone = clone $this;
297 $clone = clone $this;
298 $clone->setAdditionalTransformation($trafo);
316 $this->operations[] = $trafo;
317 if ($this->content !== null) {
318 if (!$this->content->isError()) {
319 $this->content = $trafo->
applyTo($this->content);
321 if ($this->content->isError()) {
322 $this->
setError($this->content->error());
347 $clone = clone $this;
362 if ($this->
getName() === null) {
363 throw new \LogicException(
"Can only collect if input has a name.");
381 if ($clone->content->isError()) {
382 return $clone->withError(
"" . $clone->content->error());
399 return $this->data_factory->ok(
$res);
402 $res = $this->data_factory->ok(
$res);
404 if (
$res->isError()) {
429 foreach ($this->operations as $op) {
440 if (is_null($this->content)) {
441 throw new \LogicException(
"No content of this field has been evaluated yet. Seems withRequest was not called.");
443 return $this->content;
checkArg($which, $check, $message)
/** Throw an InvalidArgumentException containing the message if $check is false.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
trait ComponentHelper
Provides common functionality for component implementations.
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
checkBoolArg($which, $value)
Throw an InvalidArgumentException if $value is not a bool.
foreach($_POST as $key=> $value) $res
appendTriggeredSignal(Component\Signal $signal, $event)
Append a triggered signal to other signals of the same event.
withTriggeredSignal(Component\Signal $signal, $event)
Add a triggered signal, replacing any other signals registered on the same event. ...