Find corresponding field that will be accessed in database.

@param $field
@return string
167905
private function getJqSearchField($field)
    {
        // jqSearchable is not initialized
        if (!isset($this->jqSearchable) || !is_array($this->jqSearchable)) {
            return $field;
        }

        return isset($this->jqSearchable[$field]) ? $this->jqSearchable[$field] : $field;
    }
967736
protected function getName($field)
    {
        if (is_array($this->name)) {
            return isset($this->name[$field]) ? $this->name[$field] : $field;
        }

        return $this->name ?: $field;
    }
111292
public function build_field($field)
	{
		! $field instanceof Fieldset_Field && $field = $this->field($field);

		return $field->build();
	}
470262
private function getPlainField($field)
    {
        if (!isset($this->fields[$field['name']])) {                     
			$this->fields[$field['name']] = $this->getDbConnection()->fetchColumn('SELECT `'.$field['name'].'` FROM '.$this->table.' WHERE id='.(int)$this->fields['id']);
		}
        return $this->fields[$field['name']];
    }
1319385
public function getFieldType($field)
    {
        $type = 'Line';

        // if form field type explicitly set in models UI properties
        if (isset($field->ui['display'])) {
            $tmp = $field->ui['display'];
            if (isset($tmp['form'])) {
                $tmp = $tmp['form'];
            }
            if (is_string($tmp) && $tmp) {
                return $tmp;
            }
        }

        // associate hasOne (Reference_One) fields with DropDown form field
        if ($this->model->hasRef($field->short_name)) {
            return 'DropDown';
        }

        // associate enum fields with DropDown form_field
        if (isset($field->enum) && $field->type != 'boolean') {
            return 'DropDown';
        }

        // try to find associated form field type
        if (isset($this->type_associations[$field->type])) {
            $type = $this->type_associations[$field->type];
        }

        return $type;
    }
873079
public function field($field=null) {
		$default_render = $this->default_render;
		if($default_render !== null)
			return $default_render($field);
		elseif($field instanceof Field)
			return $field->def();
	}
1335807
private function getFieldValue($field)
    {
        return isset($this->values[$field]) ? $this->values[$field] : null;
    }
6931
public function field($field)
    {
        if (!isset($field['name'])) {
            throw new SqlException("Missing column name.");
        }
        if (!isset($field['use'])) {
            if (isset($field['type'])) {
                $field += $this->type($field['type']);
            } else {
                $field += $this->type('string');
            }
        }
        return $field + [
            'name'      => null,
            'type'      => null,
            'length'    => null,
            'precision' => null,
            'serial'    => false,
            'default'   => null,
            'null'      => null
        ];
    }
1140465
public function getFieldData($field)
    {
        // $this->data could only be array or object, which has been checked by $this->setData
        if ((is_array($this->data) && array_key_exists($field, $this->data))
            || ($this->data instanceof \ArrayAccess && $this->data->offsetExists($field))
        ) {
            return $this->data[$field];
        } elseif (isset($this->data->$field)) {
            return $this->data->$field;
        } elseif (method_exists($this->data, 'get' . $field)) {
            return $this->data->{'get' . $field}();
        } else {
            return null;
        }
    }
50461
public function getFieldDefinition($field)
    {
        if (isset($this->definition[$field])) {
            return $this->definition[$field];
        }
        if (isset($this->definition['fields'][$field])) {
            return $this->definition['fields'][$field];
        }
        return null;
    }
729870
public function expressionForField($field)
    {
        return isset($this->select[$field]) ? $this->select[$field] : null;
    }
945676
public function getUpdateSqlFieldName($field)
    {
        $lang = $this->getLanguage();
        if ($lang && $this->_blEmployMultilanguage && $this->isMultilingualField($field)) {
            $field .= "_" . $lang;
        }

        return $field;
    }
899535
public function get($field)
    {
        if (!is_null($this->filtered) && ! is_null($this->filtered[0])) {
            return isset($this->filtered[0][0][$field]) ? $this->filtered[0][0][$field] : null;
        }

        // Todo: Get values of entities
    }
473606
public function getField($field)
    {
        $result = array_filter($this->getFields(), function($input) use ($field) {
            return $field === $input->getName();
        });

        return reset($result);
    }
607811
public function getFieldInfo($field)
    {
        $name = $field->getName();
        $type = '';
        if ($field instanceof IntegerField || $field instanceof AutoField) {
            $type = 'int';
        }
        if ($field instanceof CharField) {
            $type = 'string';
        }

        if ($field instanceof FloatField || $field instanceof DecimalField) {
            $type = 'float';
        }

        if ($field instanceof DateField) {
            $type = '\\'.\DateTime::class;
        }

        if ($field instanceof RelatedField) {
            $field->setNull(true);
            /** @var $desc RelationDescriptor* */
            $desc = $field->getDescriptor();
            $manger = $desc->getManagerClass();
            $type = '\\'.$manger;
        }
        if ($field instanceof ForeignObjectRel) {
            $name = $field->getAccessorName();

            /** @var $desc RelationDescriptor* */
            $desc = $this->model->{$name};
            $manger = $desc->getManagerClass();
            $type = '\\'.$manger;
        }

        return [$type, $name];
    }
1278870
public function getField($field)
    {
        // If we already have a value in $this->record, then we should just return that
        if (isset($this->record[$field])) {
            return $this->record[$field];
        }

        // Do we have a field that needs to be lazy loaded?
        if (isset($this->record[$field . '_Lazy'])) {
            $tableClass = $this->record[$field . '_Lazy'];
            $this->loadLazyFields($tableClass);
        }
        $schema = static::getSchema();

        // Support unary relations as fields
        if ($schema->unaryComponent(static::class, $field)) {
            return $this->getComponent($field);
        }

        // In case of complex fields, return the DBField object
        if ($schema->compositeField(static::class, $field)) {
            $this->record[$field] = $this->dbObject($field);
        }

        return isset($this->record[$field]) ? $this->record[$field] : null;
    }
1032848
public function get($field)
    {
        if ($this->definition->getField($field, 'value') !== null) {
            return $this->definition->getField($field, 'value');
        }

        if (!array_key_exists($field, $this->entity)) {
            return null;
        }

        $type  = $this->definition->getType($field);
        $value = $this->toType($this->entity[$field], $type);
        return $value;
    }