[TYPO3-mvc] Calling Extbase Controller/Action from scheduler task (CLI)???

Marc Bastian Heinrichs typo3 at mbh-web.de
Fri Jul 2 13:18:45 CEST 2010


Hi Roberto,

> Basically all I need on the CLI is the persistence framework in order to
> user my repositories and entity objects.
> Any tips where to look to get the framework initialized "the hard way" would
> be much appreciated.

In my cli-script I needed extbase also only for persistence.
I've done this by initialisation an dummy dispatcher. The method
initializeConfigurationManagerAndFrameworkConfiguration
of the dispatcher has to be set from protected to public for doing this.



protected function initDispatcher() {
	$extbaseConfiguration = array(
		'persistence' => '< plugin.tx_uwhstaff.persistence',
		'view' => '< plugin.tx_uwhstaff.view',
	);
		
	$dummyDispatcher = t3lib_div::makeInstance('Tx_Extbase_Dispatcher');
	
$dummyDispatcher->initializeConfigurationManagerAndFrameworkConfiguration($extbaseConfiguration,
'');

}

Regards,
Marc Bastian


More information about the TYPO3-project-typo3v4mvc mailing list