‪TYPO3CMS  9.5
TYPO3\CMS\Extbase\Property\TypeConverter\FloatConverter Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Property\TypeConverter\FloatConverter:
TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter TYPO3\CMS\Extbase\Property\TypeConverterInterface TYPO3\CMS\Core\SingletonInterface

Public Member Functions

float TYPO3 CMS Extbase Error Error convertFrom ($source, $targetType, array $convertedChildProperties=[], \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration=null)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
array< string > getSupportedSourceTypes ()
 
string getSupportedTargetType ()
 
string getTargetTypeForSource ($source, $originalTargetType, \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration=null)
 
int getPriority ()
 
bool canConvertFrom ($source, $targetType)
 
array getSourceChildPropertiesToBeConverted ($source)
 
 getTypeOfChildProperty ($targetType, $propertyName, \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Property\TypeConverterInterface
string getTargetTypeForSource ($source, $originalTargetType, PropertyMappingConfigurationInterface $configuration=null)
 

Public Attributes

const CONFIGURATION_THOUSANDS_SEPARATOR = 'thousandsSeparator'
 
const CONFIGURATION_DECIMAL_POINT = 'decimalPoint'
 

Protected Attributes

array< string > $sourceTypes = array( 'float', 'integer', 'string' )
 
string $targetType = 'float'
 
int $priority = 10
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter
array< string > $sourceTypes = array( )
 
string $targetType = ''
 
int $priority
 
TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 

Detailed Description

Converter which transforms a simple type to a float.

This is basically done by simply casting it.

Definition at line 22 of file FloatConverter.php.

Member Function Documentation

◆ convertFrom()

float TYPO3 CMS Extbase Error Error TYPO3\CMS\Extbase\Property\TypeConverter\FloatConverter::convertFrom (   $source,
  $targetType,
array  $convertedChildProperties = [],
\TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface  $configuration = null 
)

Actually convert from $source to $targetType, by doing a typecast.

Parameters
mixed$source
string$targetType
array$convertedChildProperties
\TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface$configuration
Returns
‪float|\TYPO3\CMS\Extbase\Error\Error

Implements TYPO3\CMS\Extbase\Property\TypeConverterInterface.

Definition at line 55 of file FloatConverter.php.

Member Data Documentation

◆ $priority

int TYPO3\CMS\Extbase\Property\TypeConverter\FloatConverter::$priority = 10
protected

Definition at line 44 of file FloatConverter.php.

◆ $sourceTypes

array<string> TYPO3\CMS\Extbase\Property\TypeConverter\FloatConverter::$sourceTypes = array( 'float', 'integer', 'string' )
protected

Definition at line 36 of file FloatConverter.php.

◆ $targetType

string TYPO3\CMS\Extbase\Property\TypeConverter\FloatConverter::$targetType = 'float'
protected

Definition at line 40 of file FloatConverter.php.

◆ CONFIGURATION_DECIMAL_POINT

const TYPO3\CMS\Extbase\Property\TypeConverter\FloatConverter::CONFIGURATION_DECIMAL_POINT = 'decimalPoint'

Definition at line 32 of file FloatConverter.php.

◆ CONFIGURATION_THOUSANDS_SEPARATOR

const TYPO3\CMS\Extbase\Property\TypeConverter\FloatConverter::CONFIGURATION_THOUSANDS_SEPARATOR = 'thousandsSeparator'

Definition at line 27 of file FloatConverter.php.