Skip to content

Instantly share code, notes, and snippets.

@pniederlag
Created January 22, 2016 10:32
Show Gist options
  • Save pniederlag/2bd6c48db06bee481a43 to your computer and use it in GitHub Desktop.
Save pniederlag/2bd6c48db06bee481a43 to your computer and use it in GitHub Desktop.
diff --git a/typo3/sysext/extbase/Classes/Property/PropertyMapper.php b/typo3/sysext/extbase/Classes/Property/PropertyMapper.php
index 7bbc804..87a3651 100644
--- a/typo3/sysext/extbase/Classes/Property/PropertyMapper.php
+++ b/typo3/sysext/extbase/Classes/Property/PropertyMapper.php
@@ -131,6 +131,7 @@ class PropertyMapper implements \TYPO3\CMS\Core\SingletonInterface {
* @return mixed an instance of $targetType
*/
protected function doMapping($source, $targetType, \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration, &$currentPropertyPath) {
+ var_dump('doMapping ' . $targeType . ' ' . print_r($currentPropertyPath,1));
if (is_object($source)) {
$targetType = $this->parseCompositeType($targetType);
if ($source instanceof $targetType) {
@@ -195,11 +196,14 @@ class PropertyMapper implements \TYPO3\CMS\Core\SingletonInterface {
*/
protected function findTypeConverter($source, $targetType, \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration) {
if ($configuration->getTypeConverter() !== NULL) {
+ var_dump('source ' . $targetType . ' has TypeConverter');
return $configuration->getTypeConverter();
- }
+ } else {
+ var_dump('source ' . $targetType . ' look for TypeConverter');
+ };
$sourceType = $this->determineSourceType($source);
-
+ var_dump('source determinedSourceType ' . $sourceType . '');
if (!is_string($targetType)) {
throw new \TYPO3\CMS\Extbase\Property\Exception\InvalidTargetException('The target type was no string, but of type "' . gettype($targetType) . '"', 1297941727);
}
@@ -266,6 +270,9 @@ class PropertyMapper implements \TYPO3\CMS\Core\SingletonInterface {
}
$converters = $this->getConvertersForInterfaces($convertersForSource, class_implements($targetClass));
+ var_dump($converters);
+ var_dump($convertorsForSource);
+ //die('ende');
$converter = $this->findEligibleConverterWithHighestPriority($converters, $source, $targetClass);
if ($converter !== NULL) {
@@ -356,4 +363,4 @@ class PropertyMapper implements \TYPO3\CMS\Core\SingletonInterface {
return $compositeType;
}
-}
\ No newline at end of file
+}
Copy link

ghost commented Jan 22, 2016

Some portions of a limited diff may be displayed, but anything exceeding the limit is not shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment