60 if (!is_string($value) && !is_int($value)) {
63 return array_key_exists($value, $this->inputs);
68 return Input::withRequired($is_required);
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.");
115 $key = $post_input->
get($this->getName());
117 $clone->inputs[$key] = $clone->inputs[$key]->withInput($post_input);
122 if (array_key_exists($key, $clone->inputs) && $clone->inputs[$key]->getContent()->isError()) {
123 $clone->content = $clone->data_factory->error($this->lng->txt(
"ui_error_in_group"));
125 $clone->content = $this->applyOperationsTo($clone->getValue());
126 if ($clone->content->isError()) {
127 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. ...