[TYPO3-mvc] className overrides in userFunc type USER

Heiko Kromm | Paints h.kromm at paints.de
Mon Feb 22 12:20:57 CET 2016


Hi list, 

I wrote a userFunc which renders some images. Its called in TypoScript like this: 

40 = USER_INT 
40.userFunc = Foo\Bar\UserFunc\RenderImages->process 

In short this extension fetches some objects with images and renders them. 
Because of some issues with multiple languages and images I use the faltranslation-Images which overrides sole classNames like this: 

config.tx_extbase { 
objects { 
TYPO3\CMS\Extbase\Domain\Model\FileReference.className = T3easy\Faltranslation\Domain\Model\FileReference 
TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap.className = T3easy\Faltranslation\Persistence\Generic\Mapper\ColumnMap 
TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory.className = T3easy\Faltranslation\Persistence\Generic\Mapper\DataMapFactory 
TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper.className = T3easy\Faltranslation\Persistence\Generic\Mapper\DataMapper 
} 
persistence.classes { 
T3easy\Faltranslation\Domain\Model\FileReference { 
mapping { 
tableName = sys_file_reference 
} 
} 
} 
} 

If I debug my queryresult which is returned from my repository I can see that the className is used: 

object(TYPO3\CMS\Extbase\Persistence\Generic\QueryResult)[5064] 
protected 'dataMapper' => 
object( T3easy\Faltranslation\Persistence\Generic\Mapper\DataMapper )[4792] 


If I change my userFunc to type USER like this: 

40 = USER 
40.userFunc = Foo\Bar\UserFunc\RenderImages->process 

and debug the queryresult the className is not overridden: 
object(TYPO3\CMS\Extbase\Persistence\Generic\QueryResult)[1499] 
protected 'dataMapper' => 
object( TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper )[2631] 


It seems if the settings from config.tx_extbase are ignored. 
Is there a way to tell extbase that it has to use the settings from config.tx_extbase even in a userFunc of type USER? 

Regards 
Heiko 




More information about the TYPO3-project-typo3v4mvc mailing list