Perform field transformation or setting of data on placeholder.
@param  \SilverStripe\ORM\DataObject $placeholder
@param  string $field
@param  mixed $value
978776
protected function transformField($placeholder, $field, $value)
    {
        $callback = isset($this->transforms[$field]['callback']) &&
                    is_callable($this->transforms[$field]['callback']) ?
                    $this->transforms[$field]['callback'] : null;
        //handle relations
        if ($this->isRelation($field)) {
            $relation = null;
            $relationName = null;
            $columnName = null;
            //extract relationName and columnName, if present
            if (strpos($field, '.') !== false) {
                list($relationName, $columnName) = explode('.', $field);
            } else {
                $relationName = $field;
            }
            //get the list that relation is added to/checked on
            if (isset($this->transforms[$field]['list'])) {
                $relationlist = $this->transforms[$field]['list'];
            } else {
                $relationlist = null;
            }

            //check for the same relation set on the current record
            if ($placeholder->{$relationName."ID"}) {
                $relation = $placeholder->{$relationName}();
                if ($columnName) {
                    $relation->{$columnName} = $value;
                }
            } elseif ($callback) {  //get/make relation via callback
                $relation = $callback($value, $placeholder);
                if ($columnName) {
                    $relation->{$columnName} = $value;
                }
            } elseif ($columnName) { //get/make relation via dot notation
                if ($relationClass = $placeholder->getRelationClass($relationName)) {
                    $relation = $relationClass::get()
                                    ->filter($columnName, $value)
                                    ->first();
                    //create empty relation object
                    //and set the given value on the appropriate column
                    if (!$relation) {
                        $relation = $placeholder->{$relationName}();
                    }
                    //set data on relation
                    $relation->{$columnName} = $value;
                }
            }

            //link and create relation objects
            $linkexisting = isset($this->transforms[$field]['link']) ?
                                (bool)$this->transforms[$field]['link'] :
                                $this->relationLinkDefault;
            $createnew = isset($this->transforms[$field]['create']) ?
                                (bool)$this->transforms[$field]['create'] :
                                $this->relationCreateDefault;
            //ditch relation if we aren't linking
            if (!$linkexisting && $relation && $relation->isInDB()) {
                $relation = null;
            }
            //fail validation gracefully
            try {
                //write relation object, if configured
                if ($createnew && $relation && !$relation->isInDB()) {
                    $relation->write();
                } elseif ($relation && $relation->isInDB() && $relation->isChanged()) {  //write changes to existing relations
                    $relation->write();
                }
                //add relation to relationlist, if it exists
                if ($relationlist && !$relationlist->byID($relation->ID)) {
                    $relationlist->add($relation);
                }
            } catch (ValidationException $e) {
                $relation = null;
            }
            //add the relation id to the placeholder
            if ($relationName && $relation && $relation->exists()) {
                $placeholder->{$relationName."ID"} = $relation->ID;
            }
        } else { //handle data fields
            //transform field value via callback
            //(callback can also update placeholder directly)
            if ($callback) {
                $value = $callback($value, $placeholder);
            }
            //set field value
            $placeholder->update(array(
                $field => $value
            ));
        }
    }
1120626
protected function setAsFloat($field, $value)
    {
        if (in_array($field, $this->getColumns()) && (
                !array_key_exists($field, $this->object) ||
                $this->object[$field] !== $value
            )) {
            $this->dirtyFields[$field] = true;
        }
        $this->object[$field] = (float) $value;

        return $this;
    }
1203420
public function setField(string $field, $value)
    {
        if (isset($this->_record[$field]) && $this->_record[$field] === $value)
            return;

        $db = $this->getDB();
        $dao = $db->getDAO(static::class);
        $columns = $dao->getColumns();
        if (!isset($columns[$field]))
            throw new InvalidValueException("Field $field does not exist!");

        $pkey = $dao->getPrimaryKey();
        $coldef = $columns[$field];
        if (static::validate($coldef, $value))
        {
            $this->_record[$field] = $value;
            $this->_changed[$field] = true;

            if (isset($pkey[$field]))
                $this->_id[$field] = $value;

            // Synchronize value of local properties
            if (property_exists($this, $field))
                $this->$field = $value;
        }

        return $this;
    }
430425
public function placeholder(string $name, string $value): self
    {
        $this->placeholders[$name] = $value;
        return $this;
    }
604762
protected function setAsString($field, $value)
    {
        if (in_array($field, $this->getColumns()) && (
                !array_key_exists($field, $this->object) ||
                $this->object[$field] !== $value
            )) {
            $this->dirtyFields[$field] = true;
        }
        $this->object[$field] = (string) $value;

        return $this;
    }
1048011
private function addWhere($field, $operator, $value = null)
    {
        $this->wheres[] = [
            'field' => $field,
            'operator' => $this->getOperator($operator),
            'value' => $this->connection->escape($value),
        ];
    }
1203324
public function fillFieldWithValue(string $fieldName, array $value): void
    {
        $fieldElement = $this->getField($fieldName);
        $fieldElement->setValue($value);
    }
82033
public function set($field, $value)
    {
        if ($field === 'author_types' && !is_array($value)) {
            $value = explode(',', $value);
        }

        $this->_settings[$field] = $value;
    }
590094
public function offsetSet($offset, $value)
    {
        if (gettype($offset) === 'string') {
            $this->checkType($value);
            $placeholder = &$this->getDataPlaceHolder();
            $placeholder[$offset] = $value;
        } else {
            $msg = "The offset of a value in a RecordContainer must be a string.";
            throw new RuntimeException($msg);
        }
    }
393402
public function addField(string $field, string $value): self
    {
        $this->fields[$field] = $value;

        return $this;
    }
969729
public function where($field, $value)
    {
        if (!isset($this->_expression[$field]) || !is_array($value) || !is_array($this->_expression[$field])) {
            $this->_expression[$field] = $value;
        } else {
            $this->_expression[$field] = array_merge_recursive($this->_expression[$field], $value);
        }

        return $this;
    }
493870
public static function setFieldValue(&$item,$field,$value,$objectFieldAccess=false)
    {
        if(is_array($item)){
            $item[$field]=$value;
        }else if(is_object($item)){
            ObjectUtil::setPropertyValue($item, $field, $value,$objectFieldAccess);
        }
    }
290131
public function offsetSet($offset, $value)
    {
        $field = $this->dataField;

        if ($offset !== null) {
            $this->{$field}[$offset] = $value;
        } else {
            array_push($this->{$field}, $value);
        }
    }
665197
public function addPlaceholder($value, $content)
    {
        $placeholder = $this->createPlaceholder($value);

        return str_replace($value, $placeholder, $content);
    }
76765
public function setPlaceholder($placeholder)
    {
        if ($placeholder === null || $placeholder === '') {
            $this->placeholder = '';
            return $this;
        }

        $this->placeholder = $this->translator()->translation($placeholder);
        if ($this->placeholder instanceof Translation) {
            $this->placeholder->isRendered = false;
        } else {
            $this->placeholder = '';
        }

        return $this;
    }
1313097
protected function setData($field, $value)
    {
        if (property_exists($this, $field)) {
            $this->{$field} = $value;
        } else {
            throw new KeyInvalidException("Property \"{$field}\" does not exist on \"". get_class($this) ."\".");
        }

        return $this;
    }
446804
protected function renderWrapperTpl($value, array $placeholders)
    {
        $placeholders['output'] = $value;
        $value = $this->template->replaceByPrefix($this->wrapperTpl, $placeholders);
        $this->template->removePlaceholder('output');

        return $value;
    }