Set the form's auxiliary data.

This method is called via {@see self::setData()} if a "form_data" parameter
is present on the HTTP request.

@param array $data Data.
@return ObjectFormWidget Chainable.
354630
public function setFormData(array $data)
    {
        $objData = $this->objData();
        $merged = array_replace_recursive($objData, $data);

        // Remove null values
        $merged = array_filter($merged, function ($val) {
            if ($val === null) {
                return false;
            }

            return true;
        });

        $this->formData = $merged;
        $this->obj()->setData($merged);

        return $this;
    }
1110102
public function set(array $data)
    {
        foreach ($data as $field => $value) {
            $this->fields[] = $field;
            $this->dataParameters[":{$field}"] = $value;
        }
        return $this;
    }
708099
public function setData(array $data)
    {
        if (count($data)) {
            $data = array_combine($data, $data);
        }

        $this->_data = $data;

        return $this;
    }
443782
public function setExtraData($data)
    {
        if (is_a($data, Arrayable::class)) {
            $data = $data->toArray();
        }

        if ( ! is_array($data)) {
            $data = [ $data ];
        }

        $this->extraData = $data;

        return $this;
    }
343864
public function setData(array $data): self
    {
        list($this->foreignKeys, $this->belongsToMany, $this->relationshipTypes,
            $this->reversedRelationships,$this->tableNames, $this->primaryKeys,
            $this->attributeTypes, $this->attributeLengths, $this->attributes, $this->rawAttributes,
            $this->reversedClasses) = $data;

        return $this;
    }
564366
public function setData($data)
    {
        if ($this->getEntryType() === FileType::class) {
            $data = self::normalizeFilesArray($data);
        }

        $this->data = $data;

        return $this;
    }
783856
public function data(array $data = null)
    {
        if (is_null($data)) {
            return $this->data;
        }

        $this->data = $data;

        return $this;
    }
459768
public function setData(array $data)
    {
        // Filter data
        foreach ($data as $key => $value) {
            if (isset($this->_data[$key])) {
                $filter = $this->_data[$key]->filter;

                //Only filter if we have a value
                if ($value !== null) {
                    if ($value !== '') {
                        if (!($filter instanceof AnFilterInterface)) {
                            $filter = AnService::get('anahita:filter.factory')->instantiate($filter);
                        }

                        $value = $filter->sanitize($value);
                    } else {
                        $value = null;
                    }

                    $this->_data[$key]->value = $value;
                }
            }
        }

        return $this;
    }
490100
public function setResponse(array $data = null)
    {
        $this->DataArray    = $data;
        $this->ResponseData = json_encode($data);
        return $this;
    }
467991
public function setData($data)
	{
		if( is_null($data) )
		{
			$data = [];
		}

		if( $data instanceof stdClass )
		{
			$data = [$data];
		}

		if( is_array($data) )
		{
			$data = $this->checkItems($data);
			$this->data = $data;
		}

		$this->data = (array) $data;

		if(empty($this->type) && ! empty($this->data[0]))
		{
			$this->type = $this->data[0]->getType();
		}
	}
1059709
protected function setData(array $data) : Frame
    {
        $this->file     = $data['file']     ?? '';
        $this->line     = $data['line']     ?? 0;
        $this->class    = $data['class']    ?? '';
        $this->function = $data['function'] ?? '';
        $this->type     = $data['type']     ?? '';
        $this->args     = $data['args']     ?? [];

        // If we're dealing with a class, try to get its namespace and short name.
        if ($this->class) {
            $parts = explode('\\', $this->class);

            $this->shortClass = array_pop($parts);
            $this->namespace  = implode('\\', $parts);
        } else {
            // Otherwise initialize with zero-values.
            $this->shortClass = '';
            $this->namespace  = '';
        }

        return $this;
    }
1321478
protected function setWithArrayData(array $data)
    {
        if (isset($data[0])) { // multiple rows
            foreach ($data as $row) {
                $this->set($row);
            }
        } else { // multiple values
            foreach ($data as $col => $val) {
                $this->set($col, $val);
            }
            $this->set_row++;
        }
        return $this;
    }
205875
public function setData($data)
	{
		if ($data && !static::$methods[$this->method]) {
			throw new \InvalidArgumentException("HTTP method [$this->method] does not allow POST data.");
		}

		$this->data = $data;

		return $this;
	}
537903
public function setData($data)
    {
        foreach ($data as $key => $dtoData) {
            $this->data[$key] = new SummonerSpellDto($dtoData);
        }
    
        return $this;
    }
978130
private function setProperties(array $data)
    {
        foreach ($data as $key => $value) {
            $this->setProperty($key, $value);
        }

        return $this;
    }
118236
public function setData(array $data)
    {
        $data = $this->setIdFromData($data);

        parent::setData($data);
        return $this;
    }
30238
public function initFromArray(array $data) {

        $unknownFields = [];

        foreach ($data as $k => $v) {

            if (empty($v)) {
                continue;
            }

            $setter = 'set' . ucfirst(str_replace('_', '', ucwords($k, '_')));

            if (method_exists($this, $setter)) {
                $this->{$setter}($v);
                continue;
            }

            $unknownFields[$k] = $v;

        }

        if (!empty($unknownFields)) {
            trigger_error('Encountered unknown fields in response: ' . json_encode($unknownFields));
        }

        return $this;

    }