55 $this->inputs = $inputs;
61 $clone = parent::withDisabled($is_disabled);
62 $clone->inputs = array_map(
function (
$i) use ($is_disabled) {
63 return $i->withDisabled($is_disabled);
70 $clone = parent::withRequired($is_required);
72 $clone->inputs = array_map(
function (
$i) use ($is_required) {
73 return $i->withRequired($is_required);
80 $clone = parent::withOnUpdate($signal);
81 $clone->inputs = array_map(
function (
$i) use ($signal) {
82 return $i->withOnUpdate($signal);
92 if (!is_array($value)) {
95 if (count($this->
getInputs()) !== count($value)) {
98 foreach ($this->
getInputs() as $key => $input) {
99 if (!array_key_exists($key, $value)) {
102 if (!$input->isClientSideValueOk($value[$key])) {
116 return array_map(
function (
$i) {
117 return $i->getValue();
134 $clone = clone $this;
135 foreach ($this->inputs as $k =>
$i) {
136 $clone->inputs[$k] =
$i->withValue($value[$k]);
147 public function withInput(
InputData $post_input)
156 $clone = clone $this;
162 foreach ($this->
getInputs() as $key => $input) {
163 $inputs[$key] = $input->withInput($post_input);
164 $content =
$inputs[$key]->getContent();
165 if ($content->isError()) {
168 $contents[$key] = $content->value();
174 $clone->content = $clone->data_factory->error($this->lng->txt(
"ui_error_in_group"));
176 $clone->content = $clone->applyOperationsTo($contents);
179 if ($clone->content->isError()) {
180 $clone = $clone->withError(
"" . $clone->content->error());
191 $clone = parent::withNameFrom($source);
196 foreach ($this->
getInputs() as $key => $input) {
197 $named_inputs[$key] = $input->withNameFrom($source);
200 $clone->inputs = $named_inputs;
210 return $this->inputs;
240 return new \ILIAS\Data\Result\Ok([]);
242 return parent::getContent();
checkArg($which, $check, $message)
/** Throw an InvalidArgumentException containing the message if $check is false.
Class ChatMainBarProvider .
trait ComponentHelper
Provides common functionality for component implementations.
__construct(Container $dic, ilPlugin $plugin)
checkArgListElements($which, array &$values, $classes)
Check every element of the list if it is an instance of one of the given classes. ...