60 if (!is_string($value) && !is_int($value)) {
63 return array_key_exists($value, $this->inputs);
76 if (is_string($value) || is_int($value)) {
79 if (!is_array($value) || count($value) !== 2) {
80 throw new \InvalidArgumentException(
81 "Expected one key and a group value or one key only as value." 84 list($key, $group_value) = $value;
86 $clone->inputs[$key] = $clone->inputs[$key]->withValue($group_value);
99 return [$key, $this->inputs[$key]->getValue()];
108 if ($this->getName() === null) {
109 throw new \LogicException(
"Can only collect if input has a name.");
114 $key = $post_input->
getOr($this->getName(), $key);
117 $clone->inputs[$key] = $clone->inputs[$key]->withInput($post_input);
125 if ($key === null || $clone->inputs[$key]->getContent()->isError()) {
126 $clone->content = $clone->data_factory->error($this->lng->txt(
"ui_error_in_group"));
128 $clone->content = $this->applyOperationsTo($clone->getValue());
129 if ($clone->content->isError()) {
130 return $clone->withError(
"" . $clone->content->error());
Class ChatMainBarProvider .
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
__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. ...