Sets the specified field to the specified value on the given document.

@param mixed $value
350143
public function setFieldValue(object $document, string $field, $value) : void
    {
        if ($document instanceof GhostObjectInterface && ! $document->isProxyInitialized()) {
            //property changes to an uninitialized proxy will not be tracked or persisted,
            //so the proxy needs to be loaded first.
            $document->initializeProxy();
        }

        $this->reflFields[$field]->setValue($document, $value);
    }
1049327
public function offsetSet($field, $value)
    {
        if (isset($this->links[$field]['url'])) {
            $this->link_data[$field] = $value;
        } else {
            parent::offsetSet($field, $value);
        }
    }
1253727
public static function setValue($entity, $field, $value)
    {
        $entity->{'set' . ucfirst(Str::camel($field))}($value);
    }
514287
public function setValue($value)
    {
        $this->clearCachedValueIf($this->value != $value);
        $this->value = $value;
    }
553207
public function setValue($value) {
		if(is_string($value) && $this->getOption('trim'))
			$value = trim($value);

		$this->value = $value;
	}
486873
public function setValue($value)
    {
        if (is_scalar($value) or is_null($value)) {
            return;
        }
        foreach ($value as $name => $val) {
            if ($field = $this[$name]) {
                $field->getElement()->setValue($val);
            }
        }
    }
415528
public function setNewValue($attribute, $value)
    {
        $this->assertValidAttribute($attribute);

        $this->documentChangeSet[$attribute][1] = $value;
        $this->getDocumentManager()->getUnitOfWork()->setDocumentChangeSet($this->getDocument(), $this->documentChangeSet);
    }
574337
public function setValue($value)
    {
        
    	if ($value instanceof tao_helpers_form_data_UploadFileDescription){
    		// The file is being uploaded.
    		$this->value = $value;
    	} elseif (!is_null($value)) {
    		// The file has already been uploaded
    		$this->value = new tao_helpers_form_data_StoredFileDescription($value);
    	}
    	else{
    		// Empty file upload description, nothing was uploaded.
    		$this->value = new tao_helpers_form_data_UploadFileDescription('', 0, '', '');
    	}
        
    }
619259
public function setValue($name, $value)
    {
        // handle field
        if (static::fieldExists($name)) {
            $this->_setFieldValue($name, $value);
        }
        // undefined
        else {
            return false;
        }
    }
707987
public function setValue($value)
    {
        if (null !== $value && is_readable($value)) {
            $error = UPLOAD_ERR_OK;
            $size = filesize($value);
            $info = pathinfo($value);
            $name = $info['basename'];

            // copy to a tmp location
            $tmp = sys_get_temp_dir().'/'.strtr(substr(base64_encode(hash('sha256', uniqid(mt_rand(), true), true)), 0, 7), '/', '_');
            if (\array_key_exists('extension', $info)) {
                $tmp .= '.'.$info['extension'];
            }
            if (is_file($tmp)) {
                unlink($tmp);
            }
            copy($value, $tmp);
            $value = $tmp;
        } else {
            $error = UPLOAD_ERR_NO_FILE;
            $size = 0;
            $name = '';
            $value = '';
        }

        $this->value = ['name' => $name, 'type' => '', 'tmp_name' => $value, 'error' => $error, 'size' => $size];
    }
1221367
public function setFieldValue($name, $value)
    {
        foreach ($this->fields as $key => $fields) {
            if (isset($fields[$name])) {
                $this->fields[$key][$name]->setValue($value);
            }
        }
        return $this;
    }
1087128
public function setValue($value)
    {
        $matches = $this->parseKeywordText($value);
        if(isset($matches['keywords']))
        {
            if(isset($matches['keywords'][2]))
            {
                $this->database = $matches['keywords'][0];
                $this->table = $matches['keywords'][1];
                $this->field = $matches['keywords'][2];
            }
            else if(isset($matches['keywords'][1]))
            {
                $this->database = null;
                $this->table = $matches['keywords'][0];
                $this->field = $matches['keywords'][1];
            }
            else if(isset($matches['keywords'][0]))
            {
                $this->database = null;
                $this->table = null;
                $this->field = $matches['keywords'][0];
            }
            $this->alias = $matches['alias'];
        }
    }
539735
function setValue($value)
    {
        $this->_createElementsIfNotExist();
        foreach (array_keys($this->_elements) as $key) {
            if (!$this->_appendName) {
                $v = $this->_elements[$key]->_findValue($value);
                if (null !== $v) {
                    $this->_elements[$key]->onQuickFormEvent('setGroupValue', $v, $this);
                }

            } else {
                $elementName = $this->_elements[$key]->getName();
                $index       = strlen($elementName) ? $elementName : $key;
                if (is_array($value)) {
                    if (isset($value[$index])) {
                        $this->_elements[$key]->onQuickFormEvent('setGroupValue', $value[$index], $this);
                    }
                } elseif (isset($value)) {
                    $this->_elements[$key]->onQuickFormEvent('setGroupValue', $value, $this);
                }
            }
        }
    }
681201
public function setDocumentStatus(\AgentSIB\Diadoc\Api\Proto\Documents\UniversalTransferDocument\UniversalTransferDocumentStatus $value = null)
    {
        $this->DocumentStatus = $value;
    }
736187
public function setNewValue(string $field, $value) : void
    {
        $this->assertValidField($field);

        $this->entityChangeSet[$field][1] = $value;
    }
914078
public function addField($field, $value=null) {
        $this->fields[] = $field;
        if ($value != null) $this->set($field, $value);
    }
86101
public function setValue($value)
    {
        parent::setValue($value);
        $this->setChecked($this->form->getFieldValue($this->name) == $this->getValue());
        return $this;
    }