Construct a new instance from CsvField

@param \CsvMigrations\FieldHandlers\CsvField $csvField CsvField instance
@return \CsvMigrations\FieldHandlers\DbField
167982
public static function fromCsvField(CsvField $csvField) : DbField
    {
        return new self(
            $csvField->getName(),
            $csvField->getType(),
            $csvField->getLimit(),
            $csvField->getRequired(),
            $csvField->getNonSearchable(),
            $csvField->getUnique()
        );
    }
1246422
public function setFields($fields)
    {
        if ($fields instanceof RecordFields) {
            $this->fields = $fields;
        } else {
            if (is_array($fields)) {
                $fields       = new RecordFields($fields);
                $this->fields = $fields;
            }
        }
        return $this;
    }
269606
public static function forField(IField $field) : ColumnComponent
    {
        return new self($field->getName(), $field->getLabel(), ColumnComponentType::forField($field));
    }
133989
public function addField($field)
    {
        $entityFieldNames = array_flip($this->mappedFields);
        if (array_key_exists($field, $entityFieldNames)) {
            parent::addField($entityFieldNames[$field]);
        }

        return $this;
    }
115415
private function convertToCustomField($field)
    {
        if (!empty($field->attributes())) {
            if (isset($field->attributes()->{'field-name'}) && isset($field->attributes()->{'field-value'})) {
                $rawName = (string)$field->attributes()->{'field-name'};
                list($normalizedName, $prefix) = $this->splitFieldNameAndPrefix($rawName);
                $value = (string)$field->attributes()->{'field-value'};
                if (!empty($normalizedName)) {
                    return new CustomField($normalizedName, $value, $prefix);
                }
            }
        }
        return null;
    }
656039
public function withSortField(string $sortField)
    {
        Assert::oneOf($sortField, ['score', 'firstName', 'lastName', 'modifiedAt']);

        $filters = clone $this;
        $filters->sortField = $sortField;

        return $filters;
    }
1012310
public function field(string $field) : self
    {
        $this->currentField = $field;
        $this->expr->field($field);

        return $this;
    }
1143112
public static function compare(Field $fieldA, Field $fieldB)
    {
        $change = new FieldMigrationChange();
        $change->fromField = $fieldA;
        $change->toField = $fieldB;

        return $change;
    }
264895
public function build(CsvLine $csv_line_base = null)
	{
		$csv_line_base = $csv_line_base ? $csv_line_base : new CsvLine;
		$stdclass_lines = $this->getAttributesFromDb();
		foreach($stdclass_lines as $key => $line)
		{
			$csv_line = clone $csv_line_base;
			$csv_line->forceSetAttributes((Array)$line);
			$this->appendLine($csv_line);
		}
	}
523585
public function field($field)
    {
        return $this->fieldFactory->createFromField(
            $this->getFieldData($field),
            $this->getFieldValue($field)
        );
    }
99522
protected function _getCsvFieldsEncolser()
    {
        if ($this->_sStringEncloser === null) {
            $this->_sStringEncloser = $this->_sDefaultStringEncloser;
            if ($char = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sGiCsvFieldEncloser')) {
                $this->_sStringEncloser = $char;
            }
        }

        return $this->_sStringEncloser;
    }
23174
public function createWriter(bool $append = true): CsvWriterInterface
    {
        $stream = $this->openStream($append ? 'a+' : 'w+');

        $writer = new CsvStreamWriter($stream);
        $writer->setCsvControl($this->delimiter, $this->enclosure, $this->escape);

        if ($this->associativeRows) {
            $writer = new AssociativeWriterDecorator($writer);
            if ($this->headers) {
                $writer->setHeaders($this->headers);
            }
        }

        return $writer;
    }
1138407
private String buildCsvValue(final Field field,
                                 final String fieldValue) {


        return (areTextValuesWrapped && field.getType().equals(String.class)
                || isValueWrappable.test(fieldValue))
                ? wrapWithQuotes(fieldValue)
                : fieldValue;
    }
1070312
public function withRowKeyAsField(IField $field) : TableCellValueFieldDefiner
    {
        return new TableCellValueFieldDefiner($this->fieldBuilder, $this->cellClassName, $this->columnField, $field);
    }
1123178
public function setField($field)
    {
        if(is_string($field)) {
            $field = new FieldIdentifier($field);
        }
        $this->field = $field;
        return $this;
    }
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']];
    }
435232
public function getField($field)
    {
        // Skip invalid fields
        $fields = $this->compositeDatabaseFields();
        if (!isset($fields[$field])) {
            return null;
        }

        // Check bound object
        if ($this->record instanceof DataObject) {
            $key = $this->getName() . $field;
            return $this->record->getField($key);
        }

        // Check local record
        if (isset($this->record[$field])) {
            return $this->record[$field];
        }
        return null;
    }