[TYPO3-mvc] Using Repository outside a controller

Christian Zenker christian.zenker at 599media.de
Tue Jul 20 13:04:29 CEST 2010


Hi.

I'm trying to instanciate the repository of a domain model outside a  
controller. I'm using a hook of t3lib_TCEmain to do some operations after  
the record was updated or stored. For the sake of a clear design, I'd like  
to fetch the domain object of the record to let the operations be done by  
the domain model itself. But when trying to  
t3lib_div::makeInstance('Tx_MyExt_Domain_Repository_MyRepository') inside  
that hook it throws a fatal error:

Fatal Error: Argument 1 passed to  
Tx_Extbase_Persistance_Mapper_DataMapFactory::injectReflectionService()  
must be an instance of Tx_Extbase_Reflection_Service, null given

Is there any way I might get this to work, or do you have any other  
propositions?

Greetings,

Christian.

Using TYPO3 4.4.0 with the system extensions.


More information about the TYPO3-project-typo3v4mvc mailing list