19 declare(strict_types=1);
50 ?
string $byline =
null 52 $this->checkArgListElements(
'inputs', $inputs, [
I\Group::class]);
61 if ($this->requirement_constraint !==
null) {
96 "Expected one key and a group value or one key only as value." 97 .
" got '" . print_r(
$value,
true) .
"' instead." 100 list($key, $group_value) =
$value;
104 $clone->setInputs($clone->getInputsWithOperationForKey($key, fn($i) => $i->withValue($group_value)));
119 if (
null === $input) {
123 return [$key, $input->getValue()];
132 throw new LogicException(
"Can only collect if input has a name.");
136 $clone = clone $this;
140 $clone->content = $clone->data_factory->error($this->
lng->txt(
"ui_error_switchable_group_required"));
141 return $clone->withError(
"" . $clone->content->error());
144 $clone->content = $clone->data_factory->ok([$key, []]);
149 $clone = $clone->withValue($key);
150 $clone->setInputs($clone->getInputsWithOperationForKey($key, fn($i) => $i->withInput($input)));
155 if (!array_key_exists($key,
$inputs)) {
156 $clone->content = $clone->data_factory->ok([$key, []]);
161 $clone->content = $clone->data_factory->error($this->
lng->txt(
"ui_error_in_group"));
167 $content = $group_input->getContent();
174 if ($clone->content->isError()) {
175 return $clone->withError(
"" . $clone->content->error());
189 if (!array_key_exists($key,
$inputs)) {
isOK()
Get to know if the result is ok.
value()
Get the encapsulated value.
Interface Observer Contains several chained tasks and infos about them.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
A constraint encodes some resrtictions on values.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)