[TYPO3-mvc] Using repositories in eID script

Felix Nagel lists at felixnagel.com
Tue Oct 9 17:52:05 CEST 2012


Am 19.03.2011 06:16, schrieb Pankaj Lele:
> require_once(PATH_t3lib.'class.t3lib_page.php');
> /* this is needed to have extbase properly pass through
> Tx_Extbase_Persistence_Mapper_DataMapFactory::includeTca().
> */
> $GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe',
> $GLOBALS['TYPO3_CONF_VARS'], 0, 0);
> $GLOBALS['TSFE']->sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
> // get instance of object manager
> $objectManger = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
> // example
> $myRepo = $objectManger->get('Tx_MyExt_Domain_Repository_myRepository');
> // do whatever with $myRepo
>
> // save changes back to tables. needed only when you are expecting
> something to be saved back to db table. No need for read only access
> $objectManger->get('Tx_Extbase_Persistence_Manager')->persistAll();


I was not able to get this working. My set methods fail and 
propertyManager (in order to add, replace objects) wont work too.

Does this work for you with current extbase (4.7)?
Any ideas or examples how to use a repository within an eID script?

-- 
Regards
Felix Nagel




More information about the TYPO3-project-typo3v4mvc mailing list