[TYPO3-mvc] Instantiate extbase action controller inside tslib_fe hook

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Wed Oct 28 19:57:43 CET 2009


Thanks for your answer!

I'm not sure what to serve as configuration.
The plugin configuration itself is also beeing
generated in ext_localconf.php:

Tx_Extbase_Utility_Extension::configurePlugin(
	$_EXTKEY,
	'Plugin',
	array(
		'Plugin' => 'index'
	),
	array(
		'Plugin' => 'index'
	)
);

How to get the configuration for the dispatching
method inside the tslib_fe hook 'contentPostProc-output'?

I want to pass content to the action controller which should
return the processed content inside the hook.

Thank you very much!

Jochen Rau schrieb:
> Hi Thomas.
> 
> Thomas "Thasmo" Deinhamer wrote:
>> What is the correct way to instantiate an extbase action
>> controller inside a registered typo3 tslib_fe hook?
>>
>> The following didn't work:
>>
>> Tx_Extbase_Utility_ClassLoader::loadClass('Tx_MyExt_Controller_MyController'); 
>>
>>
>> t3lib_div::getUserObj('Tx_MyExt_Controller_MyController');
>>
>> The error message is:
>>
>> PHP Catchable Fatal Error: Argument 1 passed to
>> Tx_Extbase_Persistence_Mapper_DataMapper::injectReflectionService() must
>> be an instance of Tx_Extbase_Reflection_Service, null given, called in
>> /var/www/library/typo3/4.3.0b2/typo3/sysext/extbase/Classes/Dispatcher.php 
>>
>> on line 246 and defined in
>> /var/www/library/typo3/4.3.0b2/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php 
>>
>> line 115
> 
> You have invoke the controller by calling 
> Tx_Extbase_Dispatcher::dispatch($content, $configuration). See 
> Tx_Extbase_Utility_Extension how the TS configuration is being built by 
> configurePlugin().
> 
> The dispatcher is responsible for the whole bootstrap an calls the 
> specified controller.
> 
> Regards
> Jochen
> 
> 


More information about the TYPO3-project-typo3v4mvc mailing list