Calculation the field info display for this type

@param array $currentValue The current value
@param array $fieldData The other values loaded so far
@return mixed the new value
509203
public function calculateFieldInfo($currentValue, array $fieldData)
    {
        if (! $currentValue) {
            return $currentValue;
        }

        // Display nice
        $sql = $this->_sql . "WHERE grr_id = ?";
        $row = $this->db->fetchRow($sql, $currentValue);

        if ($row && isset($row['name'])) {
            return $row['name'];
        }

        return $currentValue;
    }
196622
protected function generateCheckbox($options, $currentValue = null)
    {
        $hidden = sprintf('<input type="hidden" name="%s" value="0">', $options['name']);
        $chk = sprintf('<input %s %s>', $this->arrayToHtmlAttributes($options), $options['value'] == $currentValue ? ' checked="checked"' : '');
        return $hidden . $chk;
    }
1046117
public function setFieldInc($fieldName, float $incValue = 1)
    {
        $this->option->saveData[$fieldName] = new Raw(new Field($fieldName) . ' + ' . $incValue);
        return $this;
    }
1369472
public function updateByField($fieldName, $fieldValue, array $data)
    {
        $this->manager->postPendingQuery(
            new PendingQuery(
                $this->entity,
                PendingQuery::TYPE_UPDATE,
                $this->getUpdateQuery($data)
                     ->where(
                         $this->equalsExpression($fieldName, $fieldValue)
                     ),
                $this->parameters
            )
        );
    }
50898
public function getValue($nullValue = null, $calculateFormulas = false, $formatData = true)
    {
        $value = $nullValue;
        if ($this->cell->getValue() !== null) {
            if ($this->cell->getValue() instanceof RichText) {
                $value = $this->cell->getValue()->getPlainText();
            } elseif ($calculateFormulas) {
                $value = $this->cell->getCalculatedValue();
            } else {
                $value = $this->cell->getValue();
            }

            if ($formatData) {
                $style = $this->cell->getWorksheet()->getParent()->getCellXfByIndex($this->cell->getXfIndex());
                $value = NumberFormat::toFormattedString(
                    $value,
                    ($style && $style->getNumberFormat()) ? $style->getNumberFormat()->getFormatCode() : NumberFormat::FORMAT_GENERAL
                );
            }
        }

        return $value;
    }
853011
public function field($fieldName, $fieldValue = '', $fieldBoost = null) {
        if(empty($fieldName)) {
            throw new \InvalidArgumentException('Please provide a fieldname');
        }
        $field = array(
			'name'=> $fieldName,
			'value' => $fieldValue
        );
        if(!empty($fieldBoost)) {
            $field['boost'] = $fieldBoost;
        }
        $this->fields[] = $field;
        return $this;
    }
825491
protected function generateTextinput($options, $currentValue = null)
    {
        $value = is_null($currentValue) ? $options['value'] : $currentValue;

        if (!is_string($value)) {
            $value = "";
        }

        if (!array_key_exists("type", $options)) {
            $options["type"] = "text";
        }

        unset($options["value"]);

        return sprintf('<input %s value="%s">', $this->arrayToHtmlAttributes($options), $value);
    }
1152445
protected function getFieldValueFromData($data, array $options)
    {
        $fieldValue = $this->config->getProvider('fieldValue');
        $fieldValue = new $fieldValue($this->config);
        $result = $fieldValue->provide($data, $options);

        return $result;
    }
1146117
public function handle(FieldValue $fieldValue): array
    {
        $fieldDefinitionNode = $fieldValue->getField();

        // Directives have the first priority for defining a resolver for a field
        if ($resolverDirective = $this->directiveFactory->createFieldResolver($fieldDefinitionNode)) {
            $this->fieldValue = $resolverDirective->resolveField($fieldValue);
        } else {
            $this->fieldValue = $fieldValue->setResolver(
                $fieldValue->getParentName() === 'Subscription'
                    ? $this->providesSubscriptionResolver->provideSubscriptionResolver($fieldValue)
                    : $this->providesResolver->provideResolver($fieldValue)
            );
        }

        $resolverWithMiddleware = $this->pipeline
            ->send($this->fieldValue)
            ->through(
                $this->directiveFactory->createFieldMiddleware($fieldDefinitionNode)
            )
            ->via('handleField')
            ->then(
                function (FieldValue $fieldValue): FieldValue {
                    return $fieldValue;
                }
            )
            ->getResolver();

        $argumentValues = $this->getArgumentValues();

        $this->fieldValue->setResolver(
            function () use ($argumentValues, $resolverWithMiddleware) {
                $this->setResolverArguments(...func_get_args());

                $this->validationErrorBuffer = (new ErrorBuffer)->setErrorType('validation');
                $this->builder = new Builder;

                $this->queryFilter = QueryFilter::getInstance($this->fieldValue);

                $argumentValues->each(
                    function (ArgumentValue $argumentValue): void {
                        $this->handleArgDirectivesRecursively(
                            $argumentValue->getType(),
                            $argumentValue->getAstNode(),
                            [$argumentValue->getName()]
                        );
                    }
                );

                $this->runArgDirectives();

                // Apply the argument spreadings after we are finished with all
                // the other argument handling
                foreach ($this->spreadPaths as $argumentPath) {
                    $inputValues = $this->argValue($argumentPath);
                    $this->unsetArgValue($argumentPath);

                    array_pop($argumentPath);

                    foreach ($inputValues as $key => $value) {
                        $this->setArgValue(
                            array_merge($argumentPath, [$key]),
                            $value
                        );
                    }
                }

                $this->builder->setQueryFilter(
                    $this->queryFilter
                );

                // The final resolver can access the builder through the ResolveInfo
                $this->resolveInfo->builder = $this->builder;

                return $resolverWithMiddleware($this->root, $this->args, $this->context, $this->resolveInfo);
            }
        );

        // To see what is allowed here, look at the validation rules in
        // GraphQL\Type\Definition\FieldDefinition::getDefinition()
        return [
            'name' => $fieldDefinitionNode->name->value,
            'type' => $this->fieldValue->getReturnType(),
            'args' => $this->getInputValueDefinitions($argumentValues),
            'resolve' => $this->fieldValue->getResolver(),
            'description' => data_get($fieldDefinitionNode->description, 'value'),
            'complexity' => $this->fieldValue->getComplexity(),
            'deprecationReason' => $this->fieldValue->getDeprecationReason(),
        ];
    }
201323
public function current()
    {
        if (count($this->castRows) > 0) {
            $row = array_shift($this->castRows);
        } else {
            $row = $this->schema->castRow($this->dataSource->getNextLine());
            foreach ($this->schema->fields() as $field) {
                if ($field->unique()) {
                    if (!array_key_exists($field->name(), $this->uniqueFieldValues)) {
                        $this->uniqueFieldValues[$field->name()] = [];
                    }
                    $value = $row[$field->name()];
                    if (in_array($value, $this->uniqueFieldValues[$field->name()])) {
                        throw new DataSourceException('field must be unique', $this->currentLine);
                    } else {
                        $this->uniqueFieldValues[$field->name()][] = $value;
                    }
                }
            }
        }

        return $row;
    }
1137347
public function saveFields(array $fieldData)
    {
        $trackEngine = $this->getTrackEngine();

        if (! $trackEngine) {
            return 0;
        }

        //\MUtil_Echo::track($fieldData);
        $this->_fieldData = $this->_mergeFieldValues($fieldData, $this->getFieldData(), $trackEngine);

        $changed = $trackEngine->getFieldsDefinition()->saveFields($this->_respTrackId, $this->_fieldData);

        if ($changed) {
            $this->_ensureFieldData(true);
        }

        $this->handleFieldUpdate();

        return $changed;
    }
683440
public function calculateFieldInfo($currentValue, array $fieldData)
    {
        if (! $currentValue) {
            return $currentValue;
        }

        $agenda      = $this->loader->getAgenda();
        $appointment = $agenda->getAppointment($currentValue);

        if ($appointment && $appointment->isActive()) {
            $time = $appointment->getAdmissionTime();

            if ($time) {
                return $time->toString($this->appointmentTimeFormat);
            }
        }

        return null;
    }
514668
public function onFieldDataSave($currentValue, array $fieldData)
    {
        if ((null === $currentValue) ||
                ($currentValue instanceof \Zend_Db_Expr) ||
                \MUtil_String::startsWith($currentValue, 'current_', true)) {
            return $currentValue;
        }

        $saveFormat = $this->getStorageFormat();

        if ($currentValue instanceof \Zend_Date) {
            return $currentValue->toString($saveFormat);

        } else {
            $displayFormat = $this->getDateFormat();

            $saveDate = \MUtil_Date::ifDate($currentValue, array($displayFormat, $saveFormat, \Gems_Tracker::DB_DATETIME_FORMAT));
            if ($saveDate instanceof \Zend_Date) {
                return $saveDate->toString($saveFormat);
            }
        }

        return (string) $currentValue;
    }
1306828
public function createField($fieldName, $defaultValue = null)
    {
        $numericField = parent::createField($fieldName, $defaultValue);

        if (!empty($this->Min)) {
            $numericField->setAttribute('min', $this->Min);
        }

        if (!empty($this->Max)) {
            $numericField->setAttribute('max', $this->Max);
        }

        return $numericField;
    }
712795
function addData( $cdata ) {
		// check we're in a valid field
		if ( isset( $this->data[$this->row][$this->current_field] ) ) {
			// add data to field
			$this->data[$this->row][$this->current_field] .= $cdata;
		}
	}
542799
private function querifyFieldValue($fieldValue)
    {
        if (is_array($fieldValue) && count($fieldValue) > 1) {
            sort($fieldValue);

            $quoted = array_map(function($value) {
                return '"'. $value .'"';
            }, $fieldValue);

            $fieldValue = implode(' TO ', $quoted);
            $fieldValue = '['. $fieldValue . ']';

            return $fieldValue;
        }

        if (is_array($fieldValue) && count($fieldValue) === 1) {
            $fieldValue = array_pop($fieldValue);
        }

        if ($this->useWildcards) {
            $fieldValue = '*' . $fieldValue . '*';
        }

        $termParts = explode(' ', $fieldValue);
        if (count($termParts) > 1) {
            $fieldValue = '"'.$fieldValue.'"';
        }

        return $fieldValue;
    }
1161096
public function update($fieldValues)
    {
        foreach ($fieldValues as $field => $value) {
            if ($value instanceof ExpressionInterface) {
                if ($value instanceof Increment) {
                    $fieldValues[] = "[$field]=[$field]" . ($value->step >= 0 ? '+' : '') . $value->step;
                } elseif ($value instanceof Raw) {
                    $fieldValues[] = "[$field]=" . $value->expression;
                }
                unset($fieldValues[$field]);
            }
        }

        return $this->getConnection()->update($this->getSource(), $fieldValues, $this->_conditions, $this->_bind);
    }