19 declare(strict_types=1);
60 $this->dynamic_input_template = $template;
100 $clone = clone $this;
102 foreach ($value as $input_name => $input_value) {
103 $clone->dynamic_inputs[$input_name] = $clone->dynamic_input_template->withValue($input_value);
111 $clone = parent::withDisabled($is_disabled);
112 $clone->dynamic_input_template = $clone->dynamic_input_template->withDisabled($is_disabled);
114 foreach ($clone->dynamic_inputs as
$key => $input) {
115 $clone->dynamic_inputs[
$key] = $input->withDisabled($is_disabled);
125 $clone->dynamic_input_template = $clone->dynamic_input_template->withNameFrom(
129 foreach ($clone->dynamic_inputs as
$key => $input) {
130 $clone->dynamic_inputs[
$key] = $input->withNameFrom(
140 if (null === $this->getName()) {
141 throw new LogicException(static::class .
'::withNameFrom must be called first.');
144 $clone = clone $this;
145 $contains_error =
false;
149 $clone->dynamic_inputs[$index] = $this->dynamic_input_template->withInput($input_data);
150 if ($clone->dynamic_inputs[$index]->getContent()->isOk()) {
151 $contents[] = $clone->dynamic_inputs[$index]->getContent()->value();
153 $contains_error =
true;
157 if ($contains_error) {
158 $clone->content = $clone->data_factory->error($this->
language->txt(
"ui_error_in_group"));
160 $clone->content = $clone->applyOperationsTo($contents);
163 if ($clone->content->isError()) {
164 $clone = $clone->withError((
string) $clone->content->error());
178 $values[
$key] = $input->getValue();
193 if (!is_array($value)) {
194 return $this->dynamic_input_template->isClientSideValueOk($value);
201 foreach ($value as $input_value) {
202 if (!$this->dynamic_input_template->isClientSideValueOk($input_value)) {
Refinery Factory $refinery