‪TYPO3CMS  ‪main
TYPO3Tests\TypeConverterTest\Property\TypeConverter\ExtendedCountableTypeConverter Class Reference
Inheritance diagram for TYPO3Tests\TypeConverterTest\Property\TypeConverter\ExtendedCountableTypeConverter:
TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter TYPO3\CMS\Extbase\Property\TypeConverterInterface TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 convertFrom ($source, string $targetType, array $convertedChildProperties=[], ?PropertyMappingConfigurationInterface $configuration=null)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter
 getTargetTypeForSource ($source, string $originalTargetType, ?PropertyMappingConfigurationInterface $configuration=null)
 
 getSourceChildPropertiesToBeConverted ($source)
 
 getTypeOfChildProperty (string $targetType, string $propertyName, PropertyMappingConfigurationInterface $configuration)
 

Detailed Description

Definition at line 23 of file ExtendedCountableTypeConverter.php.

Member Function Documentation

◆ convertFrom()

TYPO3Tests\TypeConverterTest\Property\TypeConverter\ExtendedCountableTypeConverter::convertFrom (   $source,
string  $targetType,
array  $convertedChildProperties = [],
?PropertyMappingConfigurationInterface  $configuration = null 
)

Actually convert from $source to $targetType, taking into account the fully built $convertedChildProperties and $configuration.

The return value can be one of three types:

  • ‪an arbitrary object, or a simple type (which has been created while mapping). This is the normal case.
  • ‪NULL, indicating that this object should not be mapped (i.e. a "File Upload" Converter could return NULL if no file has been uploaded, and a silent failure should occur.
  • ‪An instance of \TYPO3\CMS\Extbase\Error\Error – This will be a user-visible error message later on. Furthermore, it should throw an Exception if an unexpected failure (like a security error) occurred or a configuration issue happened.
Parameters
mixed$source
string$targetType
array$convertedChildProperties
\TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface$configuration
Returns
‪mixed|\TYPO3\CMS\Extbase\Error\Error the target type, or an error object if a user-error occurred
Exceptions

Implements TYPO3\CMS\Extbase\Property\TypeConverterInterface.

Definition at line 25 of file ExtendedCountableTypeConverter.php.