[TYPO3-mvc] Adding new records does not consider newRecordStoragePid

Franz Koch typo3.RemoveForMessage at elements-net.de
Wed Aug 17 13:05:19 CEST 2011


Hey Dirk,

> $bs = t3lib_div::makeInstance('Tx_Extbase_Core_Bootstrap');
> $bs->initialize($GLOBALS['TSFE']->tmpl->setup['tt_content.']['list.']['20.']['itbmemento_pi1.']);
...
> It took me some time to find out how it works...
> Is there an more correct way to let the configurationManager know in
> which extensions context the method call is done?

no, this one is fine. If the action you're triggering is registered for 
the according plugin, you could also do a $boostrap->run() with 
according parameters.

Please note that as of Extbase 1.3 you should no longer use 
t3lib_makeInstance to instantiate classes of Extbase based extensions, 
because you'll loose dependency injection and therefore things are 
likely to fail. So in your case you would first create a instance of the 
objectManager via t3lib_div::makeInstance and use it to fetch your 
repository object and whatever else you like to do outside your 
controllers etc. (the bootstrap and of course the objectManager are the 
only objects where you need t3lib_div::makeInstance)
-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list