Maps a base field.

@param array $values
The values array which is imported.
@param string $field_name
The name of the field.
165133
public function mapBasicField(array &$values, $field_name) {
    $item = $this->item;
    if (!empty($item[$field_name])) {
      $values[$field_name] = $item[$field_name];
    }
  }
238072
public function setFieldValues(array $values)
    {
        $fields = $this->toArray();
        foreach ($fields as $name => $value) {
            if (isset($values[$name]) && (!($this->getField($name) instanceof Element\Button) &&
                !($this->getField($name) instanceof Element\Input\Button) &&
                !($this->getField($name) instanceof Element\Input\Submit) &&
                !($this->getField($name) instanceof Element\Input\Reset))) {
                $this->setFieldValue($name, $values[$name]);
            } else if (!($this->getField($name) instanceof Element\Button) &&
                !($this->getField($name) instanceof Element\Input\Button) &&
                !($this->getField($name) instanceof Element\Input\Submit) &&
                !($this->getField($name) instanceof Element\Input\Reset)) {
                $this->getField($name)->resetValue();
            }
        }
        $this->filterValues();
        return $this;
    }
81687
public function getFieldValue(string $field_name)
    {
        try {
            $value = null;
            $fields = $this->stmt->fetch(\PDO::FETCH_ASSOC);
            if (array_key_exists($field_name, $fields)) {
                $value = $fields[$field_name];
            } else {
                throw new \Exception("Field '$field_name' is not present in the current result set.\n");
            }
            return $value;
        } catch (\PDOException $e) {
            die('Error: ' . $e->getMessage());
        } catch (\Exception $e) {
            die("Error: " . $e->getMessage());
        }
    }
1343369
public function setField($name, $key, $value)
    {
        if (!array_key_exists($name, $this->fields)) {
            $this->fields[$name] = [];
        }
        $this->fields[$name][$key] = $value;
    }
642194
public function setFields($values)
    {
        foreach ($values as $field => $value) {
            $this->setField($field, $value);
        }
    }
348286
public QueryBuilder mapField(String query, String field_name) throws Exception {
        JSONObject op = new JSONObject();

        if (query != null)
            op.put(Constants.REQUEST_QUERY, query);

        op.put(Constants.REQUEST_FIELD, field_name);

        JSONArray operations = (JSONArray) request.get(Constants.REQUEST_OPERATIONS);
        operations.put(op);
        request.remove(Constants.REQUEST_OPERATIONS);
        request.put(Constants.REQUEST_OPERATIONS, operations);

        return this;
    }
1207799
public function editFieldValue($field_id, $field_value_id = null)
    {
        $this->setFieldFieldValue($field_id);
        $this->setFieldValue($field_value_id);
        $this->setTitleEditFieldValue();
        $this->setBreadcrumbEditFieldValue();

        $this->setData('field', $this->data_field);
        $this->setData('field_value', $this->data_field_value);
        $this->setData('widget_types', $this->field->getWidgetTypes());
        $this->setData('languages', $this->language->getList(array('enabled' => true)));

        $this->submitEditFieldValue();
        $this->setDataImagesEditFieldValue();

        $this->outputEditFieldValue();
    }
72438
public static void addFieldValue(List<FieldMeta> fieldValues,String fieldName,Object value){
		FieldMeta fieldMeta = new FieldMeta();
		fieldMeta.setEsFieldName(fieldName);
		fieldMeta.setValue(value);
		fieldValues.add(fieldMeta);
	}
1040298
public void setHeaderValues(String name,String[] values)
    {
        _fields.put(name,Arrays.asList(values));
    }
299677
public function setValue($field, $value) {
        if (is_array($this->values)) {
            $this->values[$field] = $value;
        } elseif (is_object($this->values)) {
            $this->values->$field = $value;
        }
    }
135754
public function render($field_name, array $attributes = array())
    {
        $field = $this->field($field_name, $attributes);

        return $field->all();
    }
910574
public function mapFields($meta, array $fieldOverrides)
    {
        /* @var $fieldOverride EmbeddedOverride */
        foreach ($fieldOverrides as $fieldOverride) {
            list($embedded, $property) = explode('.', $fieldOverride->name);

            if (!$meta->hasField($fieldOverride->name) || !isset($meta->embeddedClasses[$embedded])) {
                continue;
            }

            $fieldMapping = $meta->getFieldMapping($fieldOverride->name);
            $fieldMapping = array_merge($fieldMapping, $this->columnToArray($fieldOverride->column));

            $meta->setAttributeOverride($fieldOverride->name, $fieldMapping);
        }
    }
1151077
public function bindValues(array $bind_values)
    {
        foreach ($bind_values as $key => $val) {
            $this->bindValue($key, $val);
        }
        return $this;
    }
391485
protected function _updateColumnDefaultValues ($table_name) {
		$this->_columnDefaultValues[$table_name] = [];
		foreach ($this->getColumns($table_name) as $column_name => $column) {
			if ($column['default'] !== null) {
				$this->_columnDefaultValues[$table_name][$column_name] = $column['default'];
			}
		}
	}
174406
public function map(Field $field)
    {
        $values = array();

        foreach ((array)$field->value as $value) {
            $values[] = (bool)$value;
        }

        return $values;
    }
832267
public function getFieldValue(string $field_name)
    {
        if (false === $this->validated) {
            $this->validate();
        }
        foreach ($this->validators as $validator) {
            if ($validator->getFieldName() == $field_name) {
                return $validator->getValue();
            }
        }
        throw new InvalidInputException('A field called ' . $field_name . ' was not defined.');
    }
49399
public function insert(...$field_values)
    {
        if ($this->is_done) {
            throw new RuntimeException('This batch insert is already done');
        }

        if (count($field_values) == $this->fields_num) {
            $this->rows[] = $this->connection->prepare($this->row_prepare_pattern, ...$field_values);

            if (count($this->rows) == $this->rows_per_batch) {
                $this->flush();
            }
        } else {
            throw new BadMethodCallException('Number of arguments does not match number of fields');
        }
    }