Get field type

@param string $fieldTypeCode

@return FieldTypeInterface

@throws InvalidFieldTypeException
358299
public function getFieldTypeByCode($fieldTypeCode)
    {
        if (!isset($this->fieldTypes[$fieldTypeCode])) {
            throw new InvalidFieldTypeException(sprintf('Field type "%s" is not handled.', $fieldTypeCode));
        }
        return $this->fieldTypes[$fieldTypeCode];
    }
859297
public function getSubfieldsWithCode ($code)
    {
        return array_filter($this->_subfields, function (Subfield $s) use ($code) { return $s->getCode() == $code; });
    }
870271
public function removeContentTypeTranslation(int $contentTypeId, string $languageCode): Type
    {
        $this->logger->logCall(__METHOD__, ['id' => $contentTypeId, 'languageCode' => $languageCode]);
        $return = $this->persistenceHandler->contentTypeHandler()->removeContentTypeTranslation(
            $contentTypeId,
            $languageCode
        );

        $this->cache->invalidateTags(['type-' . $contentTypeId, 'type-map', 'content-fields-type-' . $contentTypeId]);

        return $return;
    }
1132374
public static function FromNameAndTypeCode( $name, $typeCode )
	{
		$type = new Type();
		$type->name = $name;
		$type->typeCode = $typeCode;
		return $type;
	}
327618
public function registerFieldType($fieldTypeServiceId, $fieldTypeAlias)
    {
        $container = $this->container;
        $this->fieldTypes[$fieldTypeAlias] = function () use ($container, $fieldTypeServiceId) {
            return $container->get($fieldTypeServiceId);
        };
    }
475872
public function getFieldName(SPIValue $value, FieldDefinition $fieldDefinition, $languageCode)
    {
        return $this->fieldType->getName($value);
    }
1156120
public function type( $code )
	{
		if( $code ) {
			$this->conditions[] = $this->filter->compare( '==', 'service.type', $code );
		}

		return $this;
	}
689753
public function getErrorType($code)
    {
        switch ($code) {
            case E_ERROR:
                return self::$stack['type'] = 'Error'; // 1
            case E_WARNING:
                return self::$stack['type'] = 'Warning'; // 2
            case E_PARSE:
                return self::$stack['type'] = 'Parse'; // 4
            case E_NOTICE:
                return self::$stack['type'] = 'Notice'; // 8
            case E_CORE_ERROR:
                return self::$stack['type'] = 'Core-Error'; // 16
            case E_CORE_WARNING:
                return self::$stack['type'] = 'Core Warning'; // 32
            case E_COMPILE_ERROR:
                return self::$stack['type'] = 'Compile Error'; // 64
            case E_COMPILE_WARNING:
                return self::$stack['type'] = 'Compile Warning'; // 128
            case E_USER_ERROR:
                return self::$stack['type'] = 'User Error'; // 256
            case E_USER_WARNING:
                return self::$stack['type'] = 'User Warning'; // 512
            case E_USER_NOTICE:
                return self::$stack['type'] = 'User Notice'; // 1024
            case E_STRICT:
                return self::$stack['type'] = 'Strict'; // 2048
            case E_RECOVERABLE_ERROR:
                return self::$stack['type'] = 'Recoverable Error'; // 4096
            case E_DEPRECATED:
                return self::$stack['type'] = 'Deprecated'; // 8192
            case E_USER_DEPRECATED:
                return self::$stack['type'] = 'User Deprecated'; // 16384
            default:
                return self::$stack['type'] = 'Error';
        }
    }
942431
public function getFieldType(NamespaceContext $context = NULL)
	{
		try
		{
			$var = $this->getTagValue('var');
		}
		catch(\Exception $e)
		{
			return new MetaType(MetaType::TYPE_MIXED);
		}
		
		return $this->parseTypeInfo($var, ($context === NULL) ? new NamespaceContext() : $context);
	}
1221124
public function getFieldType($identifier)
    {
        if (isset($this->fieldTypes[$identifier])) {
            return $this->fieldTypes[$identifier];
        }

        return $this->fieldTypes[$identifier] = new FieldType($this->fieldTypeRegistry->getFieldType($identifier));
    }
1159408
public function getCustomField($type, $field)
    {
        if (!isset($this->customFields[$type]) ||
             !isset($this->customFields[$type][$field])) {
            return null;
        }

        return $this->customFields[$type][$field];
    }
706350
public function getFieldByCode($code)
    {
        foreach ($this->_fields as $field) {
            if ($field instanceof FieldInterface) {
                if ($field->getCode() == $code) {
                    return $field;
                }
            }
        }

        return null;
    }
770425
public function get( $code, $type = null )
	{
		if( isset( $this->attributes[$code] ) && isset( $this->attributes[$code][$type] ) ) {
			return $this->attributes[$code][$type];
		}

		$manager = \Aimeos\MShop::create( $this->getContext(), 'attribute' );

		$search = $manager->createSearch();
		$expr = array(
			$search->compare( '==', 'attribute.code', $code ),
			$search->compare( '==', 'attribute.type', $type ),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );

		$result = $manager->searchItems( $search );

		if( ( $item = reset( $result ) ) !== false )
		{
			$this->attributes[$code][$type] = $item;
			return $item;
		}
	}
663560
public function getFieldType(AttributeInterface $attribute)
    {
        $type = FieldInterface::FIELD_TYPE_TEXT;

        if ($attribute->getSourceModel() == 'Magento\Eav\Model\Entity\Attribute\Source\Boolean') {
            $type = FieldInterface::FIELD_TYPE_BOOLEAN;
        } elseif ($attribute->getBackendType() == 'int') {
            $type = FieldInterface::FIELD_TYPE_INTEGER;
        } elseif ($attribute->getFrontendClass() == 'validate-digits') {
            $type = FieldInterface::FIELD_TYPE_LONG;
        } elseif ($attribute->getBackendType() == 'decimal' || $attribute->getFrontendClass() == 'validate-number') {
            $type = FieldInterface::FIELD_TYPE_DOUBLE;
        } elseif ($attribute->getBackendType() == 'datetime') {
            $type = FieldInterface::FIELD_TYPE_DATE;
        } elseif ($attribute->usesSource()) {
            $type = $attribute->getSourceModel() ? FieldInterface::FIELD_TYPE_KEYWORD : FieldInterface::FIELD_TYPE_INTEGER ;
        }

        return $type;
    }
484287
protected function getGroupFormFieldConfig($code)
    {
        if (!$code) {
            return null;
        }

        $fields = array_get($this->groupDefinitions, $code.'.fields');

        if (!$fields) {
            return null;
        }

        return ['fields' => $fields];
    }
202051
public function mapLinkTypeCodeToColumnName($linkTypeCode)
    {

        // query whether or not the link type code has a mapping
        if (isset($this->linkTypeCodeToColumnNameMapping[$linkTypeCode])) {
            return $this->linkTypeCodeToColumnNameMapping[$linkTypeCode];
        }

        // return the passed link type code
        return $linkTypeCode;
    }
1123269
public function hasFieldOfType($fieldType)
    {
        foreach ($this->fields as $field) {
            if ($field['type'] == $fieldType) {
                return true;
            }
        }

        return false;
    }