@param       $fieldName
@param Field $field

@return mixed
480980
public function addField($fieldName, Field $field)
    {
        $this->fieldNames[ $fieldName ] = $fieldName;
        $this->fields[ $fieldName ]     = $field;

        return $fieldName;
    }
1136612
public function getModelDefinitionByFieldName($fieldName)
    {
        foreach ($this->fieldMappings as $mapping) {
            if (in_array($fieldName, $mapping->getFields())) {
                return $mapping;
            }
        }

        throw new \InvalidArgumentException(sprintf('%s does not exists in %s', $fieldName, $this->name));
    }
390264
public function getField($fieldname) {
        $i = $this->findFieldInArray($fieldname);
        if ($i !== null) {
            return $this->fields[$i];
        }
        return null;
    }
945390
protected static function getStubFromArray(string $fieldName, array $field) : array
    {
        // Try our best to find the field name
        if (empty($field['name']) && !empty($fieldName)) {
            $field['name'] = $fieldName;
        }

        if (empty($field['name'])) {
            throw new InvalidArgumentException("Field array is missing 'name' key");
        }
        if (empty($field['type'])) {
            throw new InvalidArgumentException("Field array is missing 'type' key");
        }

        return [
            $field['name'] => $field,
        ];
    }
700657
public function getErrors($fieldName=null)
    {
        if ($fieldName === null) {
            return $this->errors;
        }

        if (isset($this->errors[$fieldName])) {
            return $this->errors[$fieldName];
        }

        return [];
    }
571200
public function getLocalizedFieldName($fieldName)
    {
        if ($this->isLocalizedField($fieldName) || $this->isLocalizedRelation($fieldName)) {
            return self::localized_field($fieldName);
        }
        trigger_error("Field '$fieldName' is not a localized field", E_USER_ERROR);
    }
194631
public function EscapeFieldName($FieldName) {
      $Return = $this->InputPrefix;
      if ($Return != '') $Return .= '/';
      return $Return . $this->EscapeString($FieldName);
   }
408427
public function remove($fieldname)
    {
        if (isset($this->fields[$fieldname]))
            unset($this->fields[$fieldname]);

        return $this;
    }
1014126
public static function &all($fieldName = null, $keyField = null)
    {
        $collection = new static();
        if ($fieldName !== null) {
            return $collection->toArrayOf($fieldName, $keyField);
        }

        return $collection;
    }
523585
public function field($field)
    {
        return $this->fieldFactory->createFromField(
            $this->getFieldData($field),
            $this->getFieldValue($field)
        );
    }
536939
protected function passes($fieldname = null) {
		
		$helper = new StringToArray();
		return true === Request :: isPost() && null === $helper -> execute($fieldname, null, Message :: getErrors(true));
	}
1085791
final public static function name(string $fieldName) : FieldLabelBuilder
    {
        $labelBuilder       = new FieldLabelBuilder();
        $labelBuilder->name = $fieldName;

        return $labelBuilder;
    }
514670
public function prepareFieldName($fieldName)
    {
        list($fieldName) = $this->prepareQueryElement($fieldName, null, null, false);

        return $fieldName;
    }
473606
public function getField($field)
    {
        $result = array_filter($this->getFields(), function($input) use ($field) {
            return $field === $input->getName();
        });

        return reset($result);
    }
850783
private function getOldFieldName($modelName, $fieldName)
    {
        $modelRenamedFields = ArrayHelper::getValue(
            $this->renamedFields,
            $modelName,
            []
        );
        if ($modelRenamedFields) {
            $fieldName = ArrayHelper::getValue(
                $modelRenamedFields,
                $fieldName,
                $fieldName
            );
        }

        return $fieldName;
    }
312174
public function getByField($fieldName, $keys)
    {
        $keys = (array)$keys;
        if (empty($keys)) {
            return [];
        }
        $table = $this->entity->getTable();
        if (!empty($this->with)) {
            if (strpos($fieldName, '.') === false) {
                $fieldName = $this->getTableAlias($table) . '.' . $fieldName;
            }
        }
        $this->manager->commit();

        return $this->process(
            $this->getSelectQuery($table, $this->getFields($table), $fieldName, $keys)
                 ->query($this->parameters)
        );
    }
46846
protected function get_field($field) {
        $fieldname = calculator::using_attempts_string_id($this->whichattempts).$field;
        return $this->{$fieldname};
    }