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 if($this->is_required) {
84 if ($input->isRequired()) {
93 $clone = parent::withOnUpdate($signal);
94 $clone->inputs = array_map(
function (
$i) use ($signal) {
95 return $i->withOnUpdate($signal);
105 if (!is_array($value)) {
108 if (count($this->
getInputs()) !== count($value)) {
111 foreach ($this->
getInputs() as $key => $input) {
112 if (!array_key_exists($key, $value)) {
115 if (!$input->isClientSideValueOk($value[$key])) {
129 return array_map(
function (
$i) {
130 return $i->getValue();
147 $clone = clone $this;
148 foreach ($this->inputs as $k =>
$i) {
149 $clone->inputs[$k] =
$i->withValue($value[$k]);
160 public function withInput(
InputData $post_input)
169 $clone = clone $this;
175 foreach ($this->
getInputs() as $key => $input) {
176 $inputs[$key] = $input->withInput($post_input);
177 $content =
$inputs[$key]->getContent();
178 if ($content->isError()) {
181 $contents[$key] = $content->value();
187 $clone->content = $clone->data_factory->error($this->lng->txt(
"ui_error_in_group"));
189 $clone->content = $clone->applyOperationsTo($contents);
192 if ($clone->content->isError()) {
193 $clone = $clone->withError(
"" . $clone->content->error());
204 $clone = parent::withNameFrom($source);
209 foreach ($this->
getInputs() as $key => $input) {
210 $named_inputs[$key] = $input->withNameFrom($source);
213 $clone->inputs = $named_inputs;
223 return $this->inputs;
253 return new \ILIAS\Data\Result\Ok([]);
255 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. ...