![]() |
TYPO3
7.6
|
Public Member Functions | |
shouldMap ($propertyName) | |
shouldSkip ($propertyName) | |
allowAllProperties () | |
allowProperties () | |
skipProperties () | |
allowAllPropertiesExcept () | |
skipUnknownProperties () | |
shouldSkipUnknownProperties () | |
getConfigurationFor ($propertyName) | |
getTargetPropertyName ($sourcePropertyName) | |
getConfigurationValue ($typeConverterClassName, $key) | |
setMapping ($sourcePropertyName, $targetPropertyName) | |
setTypeConverterOptions ($typeConverter, array $options) | |
setTypeConverterOption ($typeConverter, $optionKey, $optionValue) | |
forProperty ($propertyPath) | |
traverseProperties (array $splittedPropertyPath) | |
getTypeConverter () | |
setTypeConverter (\TYPO3\CMS\Extbase\Property\TypeConverterInterface $typeConverter) | |
Public Attributes | |
const | PROPERTY_PATH_PLACEHOLDER = '*' |
Protected Member Functions | |
getTypeConvertersWithParentClasses ($typeConverter) | |
Protected Attributes | |
$configuration | |
$subConfigurationForProperty = array() | |
$mapping = array() | |
$typeConverter = null | |
$propertiesToBeMapped = array() | |
$propertiesToSkip = array() | |
$propertiesNotToBeMapped = array() | |
$skipUnknownProperties = false | |
$mapUnknownProperties = false | |
Concrete configuration object for the PropertyMapper.
Definition at line 31 of file PropertyMappingConfiguration.php.
allowAllProperties | ( | ) |
Allow all properties in property mapping, even unknown ones.
Definition at line 149 of file PropertyMappingConfiguration.php.
allowAllPropertiesExcept | ( | ) |
Allow all properties during property mapping, but reject a few selected ones (blacklist).
Example: allowAllPropertiesExcept('password', 'userGroup')
Definition at line 198 of file PropertyMappingConfiguration.php.
allowProperties | ( | ) |
Allow a list of specific properties. All arguments of allowProperties are used here (varargs).
Example: allowProperties('title', 'content', 'author')
Definition at line 164 of file PropertyMappingConfiguration.php.
forProperty | ( | $propertyPath | ) |
Returns the configuration for the specific property path, ready to be modified. Should be used inside a fluent interface like: $configuration->forProperty('foo.bar')->setTypeConverterOption(....)
string | $propertyPath |
Definition at line 360 of file PropertyMappingConfiguration.php.
References PropertyMappingConfiguration\traverseProperties().
Referenced by MvcPropertyMappingConfiguration\allowCreationForSubProperty(), MvcPropertyMappingConfiguration\allowModificationForSubProperty(), and MvcPropertyMappingConfiguration\setTargetTypeForSubProperty().
getConfigurationFor | ( | $propertyName | ) |
Returns the sub-configuration for the passed $propertyName. Must ALWAYS return a valid configuration object!
string | $propertyName |
Implements PropertyMappingConfigurationInterface.
Definition at line 240 of file PropertyMappingConfiguration.php.
References elseif.
getConfigurationValue | ( | $typeConverterClassName, | |
$key | |||
) |
string | $typeConverterClassName | |
string | $key |
Implements PropertyMappingConfigurationInterface.
Definition at line 272 of file PropertyMappingConfiguration.php.
getTargetPropertyName | ( | $sourcePropertyName | ) |
Maps the given $sourcePropertyName to a target property name.
string | $sourcePropertyName |
Implements PropertyMappingConfigurationInterface.
Definition at line 258 of file PropertyMappingConfiguration.php.
getTypeConverter | ( | ) |
Return the type converter set for this configuration.
Implements PropertyMappingConfigurationInterface.
Definition at line 396 of file PropertyMappingConfiguration.php.
References PropertyMappingConfiguration\$typeConverter.
|
protected |
Get type converter classes including parents for the given type converter
When setting an option on a subclassed type converter, this option must also be set on all its parent type converters.
string | $typeConverter | The type converter class |
Definition at line 343 of file PropertyMappingConfiguration.php.
References PropertyMappingConfiguration\$typeConverter.
Referenced by PropertyMappingConfiguration\setTypeConverterOption(), and PropertyMappingConfiguration\setTypeConverterOptions().
setMapping | ( | $sourcePropertyName, | |
$targetPropertyName | |||
) |
Define renaming from Source to Target property.
string | $sourcePropertyName | |
string | $targetPropertyName |
Definition at line 289 of file PropertyMappingConfiguration.php.
setTypeConverter | ( | \TYPO3\CMS\Extbase\Property\TypeConverterInterface | $typeConverter | ) |
Set a type converter which should be used for this specific conversion.
\TYPO3\CMS\Extbase\Property\TypeConverterInterface | $typeConverter |
Definition at line 408 of file PropertyMappingConfiguration.php.
References PropertyMappingConfiguration\$typeConverter.
setTypeConverterOption | ( | $typeConverter, | |
$optionKey, | |||
$optionValue | |||
) |
Set a single option (denoted by $optionKey) for the given $typeConverter.
string | $typeConverter | class name of type converter |
string | $optionKey | |
mixed | $optionValue |
Definition at line 323 of file PropertyMappingConfiguration.php.
References PropertyMappingConfiguration\$typeConverter, ClassLoadingInformation\getClassNameForAlias(), and PropertyMappingConfiguration\getTypeConvertersWithParentClasses().
setTypeConverterOptions | ( | $typeConverter, | |
array | $options | ||
) |
Set all options for the given $typeConverter.
string | $typeConverter | class name of type converter |
array | $options |
Definition at line 303 of file PropertyMappingConfiguration.php.
References PropertyMappingConfiguration\$typeConverter, ClassLoadingInformation\getClassNameForAlias(), and PropertyMappingConfiguration\getTypeConvertersWithParentClasses().
shouldMap | ( | $propertyName | ) |
The behavior is as follows:
string | $propertyName |
Definition at line 114 of file PropertyMappingConfiguration.php.
References PropertyMappingConfiguration\$mapUnknownProperties.
shouldSkip | ( | $propertyName | ) |
Check if the given $propertyName should be skipped during mapping.
string | $propertyName |
Implements PropertyMappingConfigurationInterface.
Definition at line 138 of file PropertyMappingConfiguration.php.
shouldSkipUnknownProperties | ( | ) |
Whether unknown (unconfigured) properties should be skipped during mapping, instead if causing an error.
Implements PropertyMappingConfigurationInterface.
Definition at line 228 of file PropertyMappingConfiguration.php.
References PropertyMappingConfiguration\$skipUnknownProperties.
skipProperties | ( | ) |
Skip a list of specific properties. All arguments of skipProperties are used here (varargs).
Example: skipProperties('unused', 'dummy')
Definition at line 181 of file PropertyMappingConfiguration.php.
skipUnknownProperties | ( | ) |
When this is enabled, properties that are disallowed will be skipped instead of triggering an error during mapping.
Definition at line 215 of file PropertyMappingConfiguration.php.
traverseProperties | ( | array | $splittedPropertyPath | ) |
Traverse the property configuration. Only used by forProperty().
array | $splittedPropertyPath |
Definition at line 372 of file PropertyMappingConfiguration.php.
Referenced by PropertyMappingConfiguration\forProperty().
|
protected |
Definition at line 46 of file PropertyMappingConfiguration.php.
|
protected |
Definition at line 60 of file PropertyMappingConfiguration.php.
|
protected |
Definition at line 100 of file PropertyMappingConfiguration.php.
Referenced by PropertyMappingConfiguration\shouldMap().
|
protected |
Definition at line 86 of file PropertyMappingConfiguration.php.
|
protected |
Definition at line 72 of file PropertyMappingConfiguration.php.
|
protected |
Definition at line 79 of file PropertyMappingConfiguration.php.
|
protected |
Definition at line 93 of file PropertyMappingConfiguration.php.
Referenced by PropertyMappingConfiguration\shouldSkipUnknownProperties().
|
protected |
Definition at line 53 of file PropertyMappingConfiguration.php.
|
protected |
Definition at line 65 of file PropertyMappingConfiguration.php.
Referenced by PropertyMappingConfiguration\getTypeConverter(), PropertyMappingConfiguration\getTypeConvertersWithParentClasses(), PropertyMappingConfiguration\setTypeConverter(), PropertyMappingConfiguration\setTypeConverterOption(), and PropertyMappingConfiguration\setTypeConverterOptions().
const PROPERTY_PATH_PLACEHOLDER = '*' |
Placeholder in property paths for multi-valued types
Definition at line 36 of file PropertyMappingConfiguration.php.