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

Public Member Functions

array string 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)
 

Public Attributes

const CONFIGURATION_DELIMITER = 'delimiter'
 
const CONFIGURATION_REMOVE_EMPTY_VALUES = 'removeEmptyValues'
 
const CONFIGURATION_LIMIT = 'limit'
 

Detailed Description

Converter which transforms strings/arrays to arrays.

Definition at line 27 of file ArrayConverter.php.

Member Function Documentation

◆ convertFrom()

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

Convert from $source to $targetType, a noop if the source is an array. If it is an empty string it will be converted to an empty array. If the type converter has a configuration, it can convert non-empty strings, too

Parameters
string | array$source
\TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface$configuration
Returns
‪array|string

Implements TYPO3\CMS\Extbase\Property\TypeConverterInterface.

Definition at line 42 of file ArrayConverter.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Member Data Documentation

◆ CONFIGURATION_DELIMITER

const TYPO3\CMS\Extbase\Property\TypeConverter\ArrayConverter::CONFIGURATION_DELIMITER = 'delimiter'

Definition at line 29 of file ArrayConverter.php.

◆ CONFIGURATION_LIMIT

const TYPO3\CMS\Extbase\Property\TypeConverter\ArrayConverter::CONFIGURATION_LIMIT = 'limit'

Definition at line 31 of file ArrayConverter.php.

◆ CONFIGURATION_REMOVE_EMPTY_VALUES

const TYPO3\CMS\Extbase\Property\TypeConverter\ArrayConverter::CONFIGURATION_REMOVE_EMPTY_VALUES = 'removeEmptyValues'

Definition at line 30 of file ArrayConverter.php.