getFieldType

Return the associated type of a field.

@param  int $name
@return string
508780
public function getFieldType($name)
    {
        $type = pg_field_type($this->handler, $this->getFieldNumber($name));

        return $type !== 'unknown' ? $type : null;
    }
1292091
public function hasField($name)
    {
        if ($name instanceof Field) {
            return $name;
        }

        $f_object = $this->hasElement($name);
        if (!$f_object || !$f_object instanceof Field) {
            return false;
        }

        return $f_object;
    }
596317
private function getFieldsWithName($name)
    {
        $trigFields = array();
        $fields = &$this->form->currentFields;
        if (isset($fields[$name])) {
            $trigFields[] = $fields[$name];
        } else {
            foreach ($fields as $f) {
                if ($f->attribs['name'] == $name) {
                    $trigFields[] = $f;
                }
            }
        }
        return $trigFields;
    }
1319326
public function get(string $name) : Type
    {
        if (! isset($this->instances[$name])) {
            throw DBALException::unknownColumnType($name);
        }

        return $this->instances[$name];
    }
417110
public function getFieldByName($name)
    {
        foreach ($this->fields as $field) {
            if ($field->getName() == $name) {
                return $field;
            }
        }

        return null;
    }
456734
public function getManyToManyField($name)
    {
        $field = $this->getField($name);

        return $field instanceof ManyToManyField ? $field : null;
    }
1100484
public function getFieldValue($name)
    {
        $fieldValues = $this->toArray();
        return (isset($fieldValues[$name])) ? $fieldValues[$name] : null;
    }
781322
public function findField(string $name): Field
    {
        if ($this->hasField($name)) {
            return $this->fields[$this->fieldsNameIndex[$name]];
        }

        return null;
    }
673028
public function getRiakField($name)
    {
        return isset($this->riakProperties[$name])
            ? $this->riakProperties[$name]
            : null;
    }
421177
protected function _getField($name)
    {
        return array_key_exists($name, $this->_requestData) ? $this->_requestData[$name] : null;
    }
543265
public function getOriginalFieldValue($name)
    {
        if ($this->isFieldModified($name)) {
            return $this->fieldsModified[$name];
        }

        if (isset($this->data['fields'][$name])) {
            return $this->data['fields'][$name];
        }

        return null;
    }
978437
public function getFieldsByName( $name )
	{
		$name	= strtolower( $name );
		if( isset( $this->fields[$name] ) )
			return $this->fields[$name];
		return array();
	}
433270
private function getTypeName($name)
    {
        if (!$name) {
            return null;
        }

        if (is_string($name)) {
            return $name;
        }

        $prefix = '';
        if ($name instanceof NullableType) {
            $name   = $name->type;
            $prefix = '?';
        }

        return $prefix . $this->getFullClassName($name);
    }
1302425
private static function getInternalType($name): ?Type
    {
        switch ($name) {
            case Types::STRING:
            case 'string':
                return Type::string();
            case Types::BOOLEAN:
            case 'boolean':
            case 'bool':
                return Type::boolean();
            case Types::INT:
            case 'int':
            case 'integer':
                return Type::int();
            case Types::FLOAT:
            case 'float':
            case 'decimal':
            case 'double':
                return Type::float();
            case Types::ID:
            case 'id':
            case 'ID':
                return Type::id();
        }

        return null;
    }
1136254
public function getFieldType($field)
    {
        // default form field type
        $type = 'Line';

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

        // if form field type explicitly set in model
        if ($field->display()) {
            $tmp = $field->display();
            if (is_array($tmp)) {
                $tmp = $tmp['form'];
            }
            if ($tmp) {
                $type = $tmp;
            }
        }

        return $type;
    }
520005
public function getHasManyField($name)
    {
        $field = $this->getField($name);

        return $field instanceof HasManyField ? $field : null;
    }
1051490
protected function getField($name)
    {
        if (array_key_exists($name, $this->fields)) {
            return $this->fields[$name];
        } else {
            throw new FormatterException('Field not exists');
        }
    }