Set form results.

@param array $values
An array of values, keyed by field name.
541487
public function setResults(array $values)
    {
        foreach ($values as $field => $value) {
            if (empty($value)) {
                continue;
            }
            $this->setResult($field, $value);
        }

        return $this;
    }
180354
public function set($values)
    {
        if (! is_array($values)) {
            $values = array($values);
        }
        $this->values = $values;
        $this->snapshot();
        $this->tracker->markOverridden();
        return true;
    }
1243862
private function bindValues(array $values)
    {
        $this->bindedParameters = array();
        $this->bindedTypes = array();
        $this->bindedValues = array();

        foreach ($values as $parameter => $value) {
            if (is_int($parameter)) {
                $parameter++;
            }

            $this->bindValue($parameter, $value);
        }
    }
298657
public function setValues(array $values)
    {
        $this->getValidator()->validateRequired($values, $this->required);
        $this->values = array_merge($this->values, $values);
        
        return $this;
    }
732930
public function setSelected(array $values)
	{
		$this->assertMultiSelect();

		$candidates = array();
		/* @var $candidates SelectOption[] */

		foreach ( $this->getOptions() as $option ) {
			if ( in_array($option->getValue(), $values) ) {
				$candidates[] = $option;
			}
		}

		return $this->selectOptions($candidates);
	}
1173480
public function setValues($values)
    {

		foreach($values as $key => $value){
			foreach($this->elements as $element){
				if($element->getName() == $key){
					if( $element instanceof tao_helpers_form_elements_Checkbox ||
						(method_exists($element, 'setValues') && is_array($value)) ){
						$element->setValues($value);
					}
					else{
						$element->setValue($value);
					}
					break;
				}
			}

		}

    }
642686
protected function setOption($values)
    {
        foreach ($values as $option) {
            $this->options[$option->value] = $option->label;
        }
    }
674323
private function beforePut(array &$values): void {
    $keys = array_keys($values);

    foreach($keys as &$column) {
      if(array_key_exists($column, $this->to_db)) {
        $column = $this->to_db[$column];
      }
    }

    unset($column);

    $values = array_combine($keys, array_values($values));
  }
1258032
public function setValues(array $values)
    {
        foreach ($values as $name => $value) {
            $this->fields->set($name, $value);
        }

        return $this;
    }
1005684
protected function setForeignKeys(array $values)
    {
        foreach ($values as $key => &$value) {
            if ($this->endsWith($key, '_id')) {
                $value = $this->generateKey($value);
            }
        }

        return $values;
    }
476566
protected function setForeignKeys(array $values)
    {
        foreach ($values as $key => &$value) {
            if ($this->endsWith($key, '_id') && !is_int($value)) {
                list($table, $label) = $this->parseRecordLabel($value);
                $value = $this->generateKey($label, $table);
            }
        }

        return $values;
    }
157331
public function setFields($fields)
    {
        foreach ($fields as $name => $value) {
            $this->parameters->addPost($name, $value);
        }
    }
844181
public function loadValues(array $values)
    {
        foreach ($values as $name => $value) {
            $argument = $this->getArgument($name, static::MODE_RETURN_NULL);

            if (null !== $argument) {
                $argument->setValue($value);
            }
        }

        return $this;
    }
626408
public function setValuesAttribute(array $values = [])
    {
        static::saved(function ($model) use ($values) {
            $savedIds = [];
            foreach ($values as $data) {
                if (empty(array_filter($data))) {
                    continue;
                }
                // Create option or enable it if exists
                $value = $this->values()->updateOrCreate([
                    'code' => $data['code'],
                ], $data);
                $savedIds[] = $value->id;
            }
            $this->values()->whereNotIn('id', $savedIds)->delete();
        });
    }
158241
public function setValues(array $values) : MultipleSelect
    {
        foreach ($this->getOptions() as $option) {
            $option->setSelected(in_array($option->getValue(), $values, true));
        }

        return $this;
    }
853915
public function setValues(array $values) : CheckboxGroup
    {
        foreach ($this->checkboxes as $checkbox) {
            $checkbox->setChecked(in_array($checkbox->getValue(), $values, true));
        }

        return $this;
    }
968384
protected function setFieldResults(array $fieldResults)
    {
        foreach ($fieldResults as $fieldName => $validationResult) {
            $this->setFieldResult($fieldName, $validationResult);
        }
    }