[TYPO3-ect] lib/div: Problems with using controller as sub-controller
Michael Knoll
mimi at kaktusteam.de
Tue Oct 9 16:50:31 CEST 2007
Franz Koch wrote:
> Hi,
>
>>> public function showUserSearchAction() {
>>> $actionPipe =
>>> $this->makeInstance('tx_mklvcommunity_models_user');
>>> $actionPipe =
>>> $this->makeInstance('tx_mklvcommunity_views_userSearch',
>>> $actionPipe);
>
>> The error message I get is the following:
>>
>> Fatal error: Call to a member function get() on a non-object in
>> /var/www/localhost/svn/subida/typo3conf/ext/lib/class.tx_lib_processorBase.php
>> on line 104
>
> Having a look at your function above, I could imagine that the problem
> could be, that you first delcare $actionPipe with a modelObject and then
> declare $actionPipe with a new viewObject, passing $actionPipe as
> parameter, which probably is passed by reference? So you might pass a
> reference to the viewObject with itself (if it is passed referenced -
> not sure - didn't have a look at the source of lib).
> I would first try to use a different variable name for the modelObject.
> Just a shot in the dark (german: Schuss ins Blaue).
>
> --
> Kind regards,
> Franz Koch
Hallo Franz,
that doesn't seem to be the problem, I'm using this construct quite
often and it's shown in the tutorials like that.
The question is more general, how can I use a controller as a
subcontroller in another controller? I think it has something to do with
the context, the controller is initialized.
Perhaps someone can help me out!
So far
Mimi
More information about the TYPO3-team-extension-coordination
mailing list