[TYPO3-english] Extbase - comma separated values select mapping on property

Jan Bednarik info at bednarik.org
Wed Apr 20 22:29:27 CEST 2016


                     case 'array':
                         // $propertyValue = 
$this->mapArray($row[$columnName]); // Not supported, yet!
                         break;

This is the problem!

I managed to xclass the DataMapper and supply

$propertyValue = 
\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',',$row[$columnName]);

Not a nice way though.

Jan

Dne 20.04.2016 v 21:55 Jan Bednarik napsal(a):
> Hi,
>
> I wonder what is the correct way of mapping a select that's persisted as
> comma separated values on a property. At the moment I have the property
> as array which is working when setting the property from
> <f:form.select>. Problem is that the array is empty in the object that
> comes into the "show" action. So what to do with it?
>
> Thanks
>
> Jan



More information about the TYPO3-english mailing list